The first of your two statement has an error...
Me.cellStatusBar1.Attributes.CssStyle.Remove("class")
will remove a style attribute.. for example.. if my tag in HTML looks like
this
....
<td id="cell1" style="color:red" runat="server">
....
and I have this in my codebehind
cell1.Attributes.CssStyle.Remove("color");
the following tag would be produced on the client:
....
<td id="cell1" style="" runat="server">
....
The reason it still works for you is because, as I tested, if you add an
attributes (in your case the "class" attribute) and it already exists, it is
overridden. If you want to still remove it, you would just modify it like
this:
'First remove the class attribute from the cell
Me.cellStatusBar1.Attributes.Remove("class")
'Now add it back in specifying which class to use
Me.cellStatusBar1.Attributes.Add("class", "clsChkOutBar_NormalText")
-Cliff
PS Sorry about the mix of C# and VB... I'm sure you still get it...
moondaddy said:
I found a way. Please let me know if there's a better way than this.
Thanks.
'First remove the class attribute from the cell
Me.cellStatusBar1.Attributes.CssStyle.Remove("class")
'Now add it back in specifying which class to use
Me.cellStatusBar1.Attributes.Add("class", "clsChkOutBar_NormalText")