Class attribute with asp controls

E

E. Zackatackali

Hello,

Is it possible to use the class attribute with asp:XXX controls? I notice
that when I try to do this (so that I can use stylesheets with these
controls), Visual Studio reports an error that there is no such attribute as
class.

Thanks,

EZ
 
G

Guest

It is called CssClass
and can be used such like MyTextBox.CssClass = "class1" or
MyTextBox.CssClass = "class1 class2"

or
<asp:TextBox Runat="Server" CssClass="class1" Id="MyTextBox" />
 
I

IPGrunt

Hello,

Is it possible to use the class attribute with asp:XXX controls? I notice
that when I try to do this (so that I can use stylesheets with these
controls), Visual Studio reports an error that there is no such attribute as
class.

Thanks,

EZ

In asp.net webcontrols, it's called CssClass, and whether or not it
exists depends on the control.

But if you're using VS.NET, then you could have figured this out
using the Properties box.

-- ipgrunt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top