S
Sergei Shelukhin
We have a custom (ascx) control that is used in several pages.
In ASP.NET 1.1, we had register tagprefix specified in every page that
uses this control; in 2.0, I decided to add this control to one more
page so I added tagprefix registration to web.config. However, when I
tried to open the page (after building the app ofc) it gave me errors
in control's page_load - all of its inner controls (textboxes etc) were
nulls.
As soon as I copy pasted register tagprefix from some of the old forms,
everything started working.
I also had this problem with some of the new controls I wrote -
doclaratively declared textboxes etc in my new controls were not
instantiated when I added my control to a page with tagprefix stuff
stored in web.config. I didn't know how to fix it back then so I wound
up writing logic to create inner controls at runtime and add them to
this.Controls collection.
How do I fix this error?
In ASP.NET 1.1, we had register tagprefix specified in every page that
uses this control; in 2.0, I decided to add this control to one more
page so I added tagprefix registration to web.config. However, when I
tried to open the page (after building the app ofc) it gave me errors
in control's page_load - all of its inner controls (textboxes etc) were
nulls.
As soon as I copy pasted register tagprefix from some of the old forms,
everything started working.
I also had this problem with some of the new controls I wrote -
doclaratively declared textboxes etc in my new controls were not
instantiated when I added my control to a page with tagprefix stuff
stored in web.config. I didn't know how to fix it back then so I wound
up writing logic to create inner controls at runtime and add them to
this.Controls collection.
How do I fix this error?