Visual Studio creates UserControls as wrong type

  • Thread starter Thread starter Carlo Razzeto
  • Start date Start date
C

Carlo Razzeto

Hey, I've got a couple of production UserControls going in my companies web
system, but I'm having a couple of annoying issues with them. One of them,
for instance is a ScannerButton control which launches an in house scanning
application from a web page. When vs.net 2005 add the variable to the
..aspx.desginer.vb file it adds it as System.Web.UserControl rather than
WebAppNameSpace.ScannerButton which is what the object actually is. Is there
any way around this? The control is registered through out the web system
via the web.config system.web / pages / controls / add XML tag. It looks
something like this..

<system.web>
<pages>
<controls>
<add tagPrefix="Empiric" tagName="ScannerButton"
src="~/UserControls/ScannerButton.ascx" />
<add tagPrefix="Empiric" tagName="DateBox"
src="~/UserControls/DateBox.ascx" />
</controls>
</pages>
</system.web>
 
Carlo Razzeto said:
Hey, I've got a couple of production UserControls going in my companies
web system, but I'm having a couple of annoying issues with them. One of
them, for instance is a ScannerButton control which launches an in house
scanning application from a web page. When vs.net 2005 add the variable to
the .aspx.desginer.vb file it adds it as System.Web.UserControl rather
than WebAppNameSpace.ScannerButton which is what the object actually is.
Is there any way around this? The control is registered through out the
web system via the web.config system.web / pages / controls / add XML tag.
It looks something like this..

<system.web>
<pages>
<controls>
<add tagPrefix="Empiric" tagName="ScannerButton"
src="~/UserControls/ScannerButton.ascx" />
<add tagPrefix="Empiric" tagName="DateBox"
src="~/UserControls/DateBox.ascx" />
</controls>
</pages>
</system.web>
 
Back
Top