How to set the css class of a td tag?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: How to set the css class of a td tag?

  1. #1
    Join Date
    Jun 2007
    Posts
    3

    How to set the css class of a td tag?

    I need to set the css class of a <td> tag from the codebehind and there is no cssclass in the list of properties for that variable. Is there any other way to set the class of that tag? I can add all the style elements with td.Style.Add but thats not pretty when u have a lot of things and u already have those defined in a class.

    Thanks!

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto
    Posts
    805

    Re: How to set the css class of a td tag?

    why does it have to be in codebehind ?

    you can simply do this on the main page : <td class="myClass"></td>

    however if you want to do it in codebehind i believe you would do something like
    Code:
    mytableCell.Attributes.Add("class","myClass");
    this link has more

    http://www.velocityreviews.com/forum...de-behind.html

    hth,
    mcm
    rate my posts!
    mcm

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center