Hello,
I am working on a webpage and at some point I need to disable a asp:button.
This page uses a css file that has the following class:
.pagerLinkDisabled
{
display: none;
}
So every time I set a button to disabled .net renders it with class="pagerLinkDisabled"
and the button is not displayed...
At pageload I tried this:
myButton.Enabled=false;
myButton.Style.Add("display","static");
How can I work around this problem without changing the css file?
Thanks :)
Edit:
To clarify:
The button is being rendered but when enabled is set to false the framework is adding class="pagerLinkDisabled" to the input tag.
This class is defined at a css file that I cannot change.
Edit2:
My button is defined as such:
<asp:Button runat="server" ID="myButton" Text="mytext" Enabled="false" />
The html that is being rendered is:
<input type="submit" name="ctl00$ContentPlaceHolder$ctl00$myButton" value="mytext" id="ctl00_ContentPlaceHolder_ctl00_myButton" class="pagerLinkDisabled" />