jbaisden
asked on
Setting the class attribute of an System.Web.UI.HtmlControls.HtmlTableCell ???????? ASP VB NET
This is probably really easy, but it's bothering the heck out of me. I am dynamically adding cells to rows and rows to a table, all of which are the System.Web.UI.HtmlControls type. I have the following excerpt:
tableCell = New System.Web.UI.HtmlControls .HtmlTable Cell
tableCell.Attributes.CssSt yle.Add("c lass", "ModuleSubHead")
tableRow.Cells.Add(tableCe ll)
...which doesn't seem to be setting the class attribute of the <TD> tag. Instead the above code adds the following:
<TD style="Class: ModuleSubHead" >, which doesn't work.
What I want to end up with is the following:
<TD class="ModuleSubHead" > </td>.
It doesn't seem like this should be that difficult. Can someone please help me out here>
tableCell = New System.Web.UI.HtmlControls
tableCell.Attributes.CssSt
tableRow.Cells.Add(tableCe
...which doesn't seem to be setting the class attribute of the <TD> tag. Instead the above code adds the following:
<TD style="Class: ModuleSubHead" >, which doesn't work.
What I want to end up with is the following:
<TD class="ModuleSubHead" > </td>.
It doesn't seem like this should be that difficult. Can someone please help me out here>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Duh! I thought I had tried that. No matter. Thanks!!!
-Nauman.