Last post May 10, 2005 09:54 AM by smcculloch
May 10, 2005 04:23 AM|ozonic|LINK
Hi Guys and thanks for your help so far - everyone!
here is my question of the day, and just to let you know - I am now spending about 9 hours a day working through DNN - all the time - each and every day.
I have this code in Links.ascx
<asp: hyperlink cssClass='<%# thisCss %>' />
Ok there is more code - but this above line is what I am concerned about.
In my Code behind file - which is links.ascx.vb - I have this line of code.
And my golden question is why would it generate an error, when this below works fine
<asp: hyperlink cssClass='<%# now() %>' />
I know this is a VB.net language issue - not a DNN thing - but I am so frustrated, thanks
May 10, 2005 07:14 AM|smcculloch|LINK
You cannot have script inside a web control like that.
Use something like this instead..
<a class='<%# now() %>'></a>
May 10, 2005 08:04 AM|ozonic|LINK
This is a perfectly fine answer thank you - this is 100% correct.
What I would like to know is why though.
May 10, 2005 09:54 AM|smcculloch|LINK
I think it's due to the way ASP.NET processes web controls and where it processes inline script. I think the control is initialized before the script is processed, hence, the inline script is never evaluated. This is a guess though [:P]