HI Folks,
Can someone please tell me how to do this?
I just need to post a varibale and depending upon what it is, add a class to a html tag.
Here is the code:
Which generates the errror: BC30201: Expression expected Line 6: If (Len(Request.QueryString("page")) <> 0 and Request.QueryString("page") == "homelink")
Here is my html
Can someone please tell me how to do this?
I just need to post a varibale and depending upon what it is, add a class to a html tag.
Here is the code:
VB.NET:
Sub Page_Load
If (Len(Request.QueryString("page")) <> 0 and Request.QueryString("page") == "homelink")
homelink.Attributes["Class"] = "active"
end if
End Sub
Which generates the errror: BC30201: Expression expected Line 6: If (Len(Request.QueryString("page")) <> 0 and Request.QueryString("page") == "homelink")
Here is my html
HTML:
<li> <a href="default.aspx" id="homelink" runat="server">Home</a></li>