David11011
asked on
Set properties for multiple objects at once
I'm building this website that has A LOT of labels and textboxes. I'm wondering if there is a way to set properties for dynamically added controls.
Example of what I'm trying to say:
Example of what I'm trying to say:
Dim label1 as New Label
Dim label2 as New Label
Dim label3 as New Label
With label1, label2, label
.Font.Name = "Arial"
.Font.Size = 9
.ForeColor = System.Drawing.ColorTranslator.FromHtml("#333333")
.Font.Underline = True
End With
label1.ID = "lbl1"
label1.ID = "lbl2"
label1.ID = "lbl3"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Exactly what I was looking for. Thanks
so you create one, set properties athen clone it to create others :P
http://forums.asp.net/t/617980.aspx