Need some help with Web User Controls (*.ascx)
I need some help with web user controls. In my site I have created a few Web User Controls (ascx). My problem is that I want to load one or more of these controls at runtime on an aspx web page. I tried many ways but I was unable to find a solution. So I began asking myself if what I want can be done. I need a solution, advice something.
Thanks in advance.
mupparaju sureshPosted Apr 11, 2006, 8:04 AM
usercontrol usc = "usercontrol.ascx";
placeholdercontrol.controls .add(usc);
kanchana umeshPosted Apr 11, 2006, 12:19 AM
You can follow this thing,
dim ctrl as usercontrol1
ctrl=loadcontrol("usercontrol1.ascx")
panel1.controls.add(ctrl)
The above code insert the usercontrol1 to panel1.
suresh mupparajuPosted Apr 10, 2006, 2:10 AM
u can follow the this thing
control cont = " usercontrol.ascx";
placeholdercontrol.controls.add(cont);