I have the following code:
div1.Attributes.Add("class", "displayNone");
it works on page load but doesn’t on an OnClick event.
This is because my html <div id="div1"></div> seems to change to:
<div id="div1_ucSomeControl_SoemthingElse"></div>
after the page has been rendered.
How can I get around this?
I don’t think that the ID of the control matters in this case. You may be running into this issue because the
classattribute already exists. Try this instead: