i have a control page that i use for a header type menu :
<script language="vb" runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
If Request.RawUrl = ("/default.aspx"
then
Hyperlink1.CssClass = "fourthbuttons"
End If
If Request.RawUrl = ("/about.aspx"
then
Hyperlink2.CssClass = "fourthbuttons"
End If
If Request.RawUrl = ("/contact.aspx"
then
Hyperlink3.CssClass = "fourthbuttons"
End If
End Sub
the hyperlinks initially have a class="buttons" assigned to them. the style is set in a linked style sheet. the code works but if you go to it will show 2 classes for whichever link has been selected.
for example, if you go to the contact page, the code rendered will have class="fourthbuttons" and class="buttons".
ty.
<script language="vb" runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
If Request.RawUrl = ("/default.aspx"
Hyperlink1.CssClass = "fourthbuttons"
End If
If Request.RawUrl = ("/about.aspx"
Hyperlink2.CssClass = "fourthbuttons"
End If
If Request.RawUrl = ("/contact.aspx"
Hyperlink3.CssClass = "fourthbuttons"
End If
End Sub
the hyperlinks initially have a class="buttons" assigned to them. the style is set in a linked style sheet. the code works but if you go to it will show 2 classes for whichever link has been selected.
for example, if you go to the contact page, the code rendered will have class="fourthbuttons" and class="buttons".
ty.