Users Pricing

forum

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

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

Anonymous User 2443 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?


2 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md