N
Nathan Sokalski
I am sure most of us have enough experience with HTML to know that most HTML
elements allow you to specify the width and/or height attributes as
percentages. However, I have noticed that when setting properties for an
object on a webform (such as a TableCell) programmatically, the only way to
do this is by using the Add method of the Attribute property as follows:
webformobject.Attributes.Add("width", CStr(33) & "%")
Even though this is not complicated to do, I would like to know why these
objects do not have a direct property. Isn't one of the advantages of using
ASP.NET supposed to be having it generate the code/attributes for us? If
anyone knows a reason why the objects were designed this way, I would like
to know. Thanks.
elements allow you to specify the width and/or height attributes as
percentages. However, I have noticed that when setting properties for an
object on a webform (such as a TableCell) programmatically, the only way to
do this is by using the Add method of the Attribute property as follows:
webformobject.Attributes.Add("width", CStr(33) & "%")
Even though this is not complicated to do, I would like to know why these
objects do not have a direct property. Isn't one of the advantages of using
ASP.NET supposed to be having it generate the code/attributes for us? If
anyone knows a reason why the objects were designed this way, I would like
to know. Thanks.