The same applies to static Hyperlinks and to programmatically created HyperLinks:
HyperLink myCoolLink = new HyperLink();
myCoolLink.NavigateUrl = "SomePage.aspx";
myCoolLink.CssClass = "MyClass";
myCoolLink.Text = "Some Text";
This ends up in the browser as:
<a href="SomePage.aspx" class="MyClass">Some Text</a>
Not sure whether you typed over my message, or something else went wrong, but you need a dot in front of MyClass.
[WRONG]
MyClass
{
text-decoration: none;
}
MyClass:hover
{
text-decoration: underline;
}
[RIGHT]
.MyClass
{
text-decoration: none;
}
.MyClass:hover
{
text-decoration: underline;
}
Hope this helps,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of
ASP.NET 2.0 Instant Results and
Beginning Dreamweaver MX / MX 2004