Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ending up with 2 classes for one control

Status
Not open for further replies.

occas

Technical User
Jan 14, 2004
164
US
i have a control page that i use for a header type menu :

<script language=&quot;vb&quot; runat=&quot;server&quot;>
Sub Page_Load(sender As Object, e As EventArgs)
If Request.RawUrl = (&quot;/default.aspx&quot;) then
Hyperlink1.CssClass = &quot;fourthbuttons&quot;
End If
If Request.RawUrl = (&quot;/about.aspx&quot;) then
Hyperlink2.CssClass = &quot;fourthbuttons&quot;
End If
If Request.RawUrl = (&quot;/contact.aspx&quot;) then
Hyperlink3.CssClass = &quot;fourthbuttons&quot;
End If
End Sub

the hyperlinks initially have a class=&quot;buttons&quot; 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=&quot;fourthbuttons&quot; and class=&quot;buttons&quot;.
ty.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top