Visual Studio is defining my *.ascx UserControls as Global.System.Web.UI.UserControl in the *.aspx.d

  • Thread starter Nathan Sokalski
  • Start date
N

Nathan Sokalski

I have several UserControls (*.ascx files) that I register in my Web.config
file under the <system.web><pages><controls> element. If I mistype the src
attribute in the Web.config file, the pages that use the UserControl will
add something such as the following to the *.aspx.designer.vb files:

Protected WithEvents mycontrol As Global.System.Web.UI.UserControl

This is obviously not correct, because Global.System.Web.UI.UserControl is
what the *.ascx file inherits from, the name of the class for the
UserControl that is created by the *.ascx file is something else. Therefore,
every time the src attribute gets changed or mistyped I have to go and
manually edit the *.aspx.designer.vb files. Why doesn't Visual Studio 2005
automatically fix the *.aspx.designer.vb files when I fix the src attribute
in the Web.config file? Thanks.
 

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

No members online now.

Forum statistics

Threads
474,444
Messages
2,571,709
Members
48,796
Latest member
Greg L.
Top