Link to home
Start Free TrialLog in
Avatar of LVMiner
LVMiner

asked on

CSS class attribute removed in rendered HTML

I am try to apply a CSS class to an anchor element in an ascx control, however when the HTML is rendered the class attribute is removed. I am using IE 7.0. No clue as to why it is doin this.
In code: <a href="UpdateContact.aspx" class="alertMessage"><u>here</u></a> 
 
in browser-source: <a href="UpdateContact.aspx"><u>here</u></a>
 
CSS class
.alertMessage
{
 color: #660000;
}

Open in new window

Avatar of aibusinesssolutions
aibusinesssolutions
Flag of United States of America image

Hmm, that could be a couple different things.

If you are using a the built in local web server, it may be stuck caching an older page, you can right click it in your system tray and stop it then browse to it again.  For IIS just do an iisreset from Start>Run.

If not, does the <a> tag have a runat="server" tag?  Is that the exact code pasted from your code?

Are you using an asp:HyperLink?
Avatar of LVMiner
LVMiner

ASKER

Tried resetting local IIS and emptying IE 7 web cache files with negative results. The code is exact as pasted. Going to try the asp:Hyperlink to see if this is a solution.
ASKER CERTIFIED SOLUTION
Avatar of aibusinesssolutions
aibusinesssolutions
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial