Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Sam Johnson   on Sep 06 In Asp.net Category.

  
Question Answered By: Djoser Massri   on Sep 06

All code  I have mentioned refers NOT to System.Web.UI.UserControl but to System.Web.UI.WebControls.WebControl

My code using the UserControl works fine, but I want to wrap it up be able to put it in the VS toolbox.

The only worthy difference is that with the UserControl I LoadControl(ascx) file, which I have simply omitted with the webcontrols version.

Omitting it may be cocking things up regards to instances  and not being able to get to child  controls and so forth, the act of Loading a control  gives it substance, and perhaps "more than an instance" is created .... that much more so that it's children are specific to it's FindControl method (if you can catch my drift there). I know, I'm guessing.

I have tried to give  the webcontrols ID's and use Page.LoadControl("ID") but same problem in @@duplicate  id's@@ errors.

How would I load a webcontrol ???? Should I load a webcontrol ??

If you think about it, when you load a UserControl you are NOT using IT's ID are you, what exactly are you using ??? It's path ... which we haven't got in this case.

Share: