forum

Home / DeveloperSection / Forums / How to get access to “CssClass” property for server element isn't WebControl in ASP.NET?

How to get access to “CssClass” property for server element isn't WebControl in ASP.NET?

Anonymous User190011-Dec-2014

I have ordinary div like this:

<div id="myCoolElement" runat="server"></div>

I want use the construction to set CssClass for myCoolElement like this:

myCoolElement.CssClass("mycoolstyle");

But CssClass property is supported only for WebControls.

How I can set CssClass for my element without creating WebControl?


Updated on 12-Dec-2014
I am a content writter !

Can you answer this question?


Answer

2 Answers

Liked By