I have a page where I want to set my linkbutton text using a class and
cannot seem to get it to work using CSSClass, but it works fine using
"ForeColor".
Why is that?
Here is the code:
**************************************************
<%@ Page Language="VB" trace="false" debug="true" ContentType="text/html"
ResponseEncoding="iso-8859-1" %>
<Script runat="server">
sub newLogonClick(sender as Object,e as EventArgs)
end sub
</Script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Logon</title>
</head>
<style type="text/css">
..linkButton a:visited {color:#00FF33;font-weight:bold;
}
..linkButton a:link {color:#00FF33;font-weight:bold;
}
..linkButton a:active {color:#00FF33;font-weight:bold;
}
</style>
<body>
<!-- Content Starts Here -->
<form id="Form1" runat="server">
<asp:LinkButton id="newLogon" CSSClass="linkButton" onClick="newLogonClick"
Text="Register Now" runat="server" /><br>
<asp:LinkButton id="newLogon2" ForeColor="#00FF33" onClick="newLogonClick"
Text="Register Later" runat="server" />
</form>
</body>
</html>
************************************************** *************************************
I am just setting 2 links, one set with a class and one set directly.
MS says you can using CSSClass, but it doesn't seem to work.
Thanks,
Tom