Add the runat="server" attribute to it so that you have:
<div id="formSpinner" runat="server"> <img src="images/spinner.gif"> <p>Saving...</p> </div>
This way you can access the class attribute using:
formSpinner.Attributes["class"] = "classOfYourChoice";
It's also worth mentioning that the asp:Panel control is actually a synonym (at least in terms of markup) with a div , so you can also do:
<asp:Panel id="formSpinner" runat="server"> <img src="images/spinner.gif"> <p>Saving...</p> </asp:Panel>
Which then allows you to write:
formSpinner.CssClass = "classOfYourChoice";
This gives you more specific access to the property, and there are others that may or may not be useful to you.
Rob 06 Oct '08 at 18:07 2008-10-06 18:07
source share