PC Review


Reply
Thread Tools Rate Thread

Class attribute with asp controls

 
 
E. Zackatackali
Guest
Posts: n/a
 
      19th Feb 2005
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


 
Reply With Quote
 
 
 
 
Guest
Posts: n/a
 
      19th Feb 2005
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" />



"E. Zackatackali" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
IPGrunt
Guest
Posts: n/a
 
      19th Feb 2005
On 19 Feb 2005, "E. Zackatackali" <(E-Mail Removed)>
postulated in news:(E-Mail Removed):

> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Customize DataContractSerializer to use class name as tag nameinstead of base class name + type attribute Achim Domma Microsoft C# .NET 1 14th Aug 2008 09:19 AM
Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl). murl Microsoft ASP .NET 0 27th Mar 2007 10:30 PM
Question about the word Attribute in attribute class names KJ Microsoft C# .NET 2 15th Sep 2006 06:02 PM
basic: asp.net user controls: how to programmatically add attribute to all text box controls? Microsoft ASP .NET 4 9th Nov 2005 02:14 AM
Base class property Attribute not applied to derived class propert =?Utf-8?B?RGF2aWQgTA==?= Microsoft Dot NET Framework 0 9th Mar 2005 08:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:16 AM.