Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > HtmlTable control css class

Reply
Thread Tools

HtmlTable control css class

 
 
Alfred Salton
Guest
Posts: n/a
 
      06-28-2004
Can anyone show me how to set the css class of an HtmlTable control in
code on the server?

I can't find any indication that the css class is a property of the
HtmlTable, HtmlTableRow and HtmlTableCell classes. I'm getting the
uncomfortable feeling that this can't be done, even though it seems
incredible to me!

 
Reply With Quote
 
 
 
 
Jeffrey Palermo [MCP]
Guest
Posts: n/a
 
      06-28-2004
Alfred,
Any time you want to add any attribute that may not be included in the
code, just use HtmlTable.Attributes["class"] = "myCSSClass";
This will work for any attribute.

Best regards,
Jeffrey Palermo

"Alfred Salton" <> wrote in message
news:2004062721504216807%alfredsalton@hotmailcom.. .
> Can anyone show me how to set the css class of an HtmlTable control in
> code on the server?
>
> I can't find any indication that the css class is a property of the
> HtmlTable, HtmlTableRow and HtmlTableCell classes. I'm getting the
> uncomfortable feeling that this can't be done, even though it seems
> incredible to me!
>



 
Reply With Quote
 
 
 
 
Alfred Salton
Guest
Posts: n/a
 
      06-28-2004
Thanks Jeffrey, this works just fine. It is perhaps worth noting that
Attributes["class"] = "myCSSClass" uses C# syntax. VB is
Attributes("class") = "myCSSClass". This trips me up regularly - I much
prefer C# syntax, but am sometimes forced to use VB.

> Alfred,
> Any time you want to add any attribute that may not be included in the
> code, just use HtmlTable.Attributes["class"] = "myCSSClass";
> This will work for any attribute.
>
> Best regards,
> Jeffrey Palermo
>
> "Alfred Salton" <> wrote in message
> news:2004062721504216807%alfredsalton@hotmailcom.. .
>> Can anyone show me how to set the css class of an HtmlTable control in
>> code on the server?
>>
>> I can't find any indication that the css class is a property of the
>> HtmlTable, HtmlTableRow and HtmlTableCell classes. I'm getting the
>> uncomfortable feeling that this can't be done, even though it seems
>> incredible to me!



 
Reply With Quote
 
 
 
Reply

Thread Tools

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 Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I create a HTMLTable class from and HTML string. chambersdon@hotmail.com ASP .Net Building Controls 1 02-16-2006 04:21 PM
How can I create a HTMLTable class from and HTML string. chambersdon@hotmail.com ASP .Net 1 02-16-2006 04:21 PM
How to change the user control or HtmlTable position at runtime? Leo ASP .Net 1 01-04-2005 01:20 AM
Can you add <col> control to Table webcontrol or HTMLTable control? Jiho Han ASP .Net Building Controls 1 01-30-2004 03:00 AM
HtmlTable control chinye ASP .Net 0 11-05-2003 04:10 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57