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 User 2162 11-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