error with tagPrefix registering in web.config feature?

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,233
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top