Groups | Blog | Home
all groups > asp.net webcontrols > june 2004 >

asp.net webcontrols : Creating a Control in a web form Dynamically


tacoturtle
6/25/2004 8:43:01 PM
on the page init dim a new object as label. set its properties accordingly. then load the control using page.loadcontrol. Then you can use page.controls.add to put it on the page. You could create a panel or placeholder to add the label to also. Just drag one over on the page and give it a name. Then after using the loadcontrol, use page.findcontrol("myplaceholder").controls.add(labelcontrol) to put it in the place holder.
tacoturtle

[quoted text, click to view]
Haitham
6/26/2004 12:58:12 AM
Hi all,

May you kindly tell me how to create a label control in the web form
dynamically and change its width and top properties

thanks in advance

AddThis Social Bookmark Button