By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,685 Members | 1,243 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,685 IT Pros & Developers. It's quick & easy.

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

P: n/a
I have several UserControls (*.ascx files) that I register in my Web.config
file under the <system.web><pages><controlselement. 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.
Nathan Sokalski
Jun 10 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.