2010-11-17 8 views

Respuesta

15

Lo tengo.

myTableCell.Attributes.Add("class", "whatever"); 
+1

Allí fue todo el tiempo, yo mirando a la cara. Un pequeño cambio que haría desde 'Attributes' es (esencialmente) un' Dictionary ', prefiero la forma:' myTableCell.Attributes ["class"] = "whatever"; '. – JMD

0

La propiedad Attributes también funciona para el estilo CSS.

Por ejemplo:

myTableCell.Attributes.Add("style", "height: 30px; border: 1px solid;") 
Cuestiones relacionadas