Some time you may want to change the position of your web control at runtime. Though it is possible to set other properties like height and width, you can set all these properties using the add method of the style property. Let us see an example,
The example shows how to dynamically set various properties using the Style property.
Button1.Style.Add("Style", "Z-INDEX: 103; LEFT: 262px; POSITION: absolute; TOP: 115px") Button1.Style.Add("runat", "server") Button1.Style.Add("Width", "500px") Button1.Style.Add("Height", "50px") Button1.Style.Add("Font-Bold", "True") Button1.Style.Add("Font-Size", "Large") Button1.Style.Add("ForeColor", "Navy")
|
No responses found. Be the first to respond and make money from revenue sharing program.
|