I've got a button on my page in code behind I do this:
btnSaveLineItems.Style.Add("display", "none");
But later I want to show that button so I tried this:
btnSaveLineItems.Style.Clear();
This doesnt appear to reshow the button... The html markup in the beginning has a "style=display:none;" in the beginning of the page.. and it maintains that style even though I try to remove it?
When my page first starts up I have this:
btnSaveLineItems.Style["display"] = "none";
This renders like the following in HTML:
<input type="submit" name="ctl00$MainContent$btnSaveLineItems" value="Save" id="MainContent_btnSaveLineItems" title="Save changes?" style="border-color:#4B6C9E;border-style:Solid;display:none;" />
Then an event happens (selected index changed event of a drop down box) where I then do this:
btnSaveLineItems.Style["display"] = "";
I've also tried:
btnSaveLineItems.Style["display"] = "block";
and both render the same HTML:
<input type="submit" name="ctl00$MainContent$btnSaveLineItems" value="Save" id="MainContent_btnSaveLineItems" title="Save changes?" style="border-color:#4B6C9E;border-style:Solid;display:none;" />