Re: Duplicate custom controls

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



The files copied really. No virtual references.
How to rebuild whole site? In the VS IDE I see only
Build my project' or rebuild it. Neither helps.
So I excluded the newly created control from the project.
After, instead of copying, I created a new empty control but
with the same name. Rebuilt it and at the runtime it raises
the same error:
Compiler Error Message: CS1595: 'ASP.route_ascx' is defined in multiple
places

May be the problem is that controls must have different names
regardless of namespace?
I.e. 'route_ascx' should be unique across the project?


"DWS" <DWS@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:9279043D-2290-4726-B5F2-4E4778214F99@xxxxxxxxxxxxxxxx
T,
Great job! You probably need to rebuild the web site to get rid of the
error. You could have just added your first control control to the second
control without copying any files to the sub folder.

Good Luck
DWS


"Tumurbaatar S." wrote:

Hi!
I created some user control (ASCX) and it works fine.
The control is created one of subfolders of my project, so
its namespace looks like:
namespace myproject.subfolder1
{
public class route : System.Web.UI.UserControl
....

In another subfolder I also created second control, but
I used the 1st control as origin. Just copied the 1st control files
to the 2nd subfolder. After changed the 2nd control's namespace as:
namespace myproject.subfolder2
{
public class route : System.Web.UI.UserControl
....

Compilation works ok, but at run-time when I visit a page that contains
both of my controls, the server raises error:

Compilation Error
Description: An error occurred during the compilation of a resource
required
to service this request. Please review the following specific error
details
and modify your source code appropriately.
Compiler Error Message: CS1595: 'ASP.route_ascx' is defined in multiple
places; using definition from
'd:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\myproject\4b10f33a\12f97037\2bgwzy1u.dll'






.



Relevant Pages

  • Re: error message: Unable to start debugging on the web server"
    ... gave ASPNET Full Control, ... "Bruce Schechter" wrote: ... I've decided to simply rebuild the system. ... > versions on seperate machines.) ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: state of ide raid
    ... During rebuilds the server is still available and you can control ... Performance was fine during the rebuild. ... >>We've been messing with some of the IDE RAID controllers without ...
    (freebsd-stable)
  • Re: Duplicate custom controls
    ... Build my project' or rebuild it. ... So I excluded the newly created control from the project. ... Compiler Error Message: CS1595: 'ASP.route_ascx' is defined in multiple ... its namespace looks like: ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: WebControls TreeView Error
    ... you will need to rebuild your dll for the tree control again in order to ... > TreeNodeSrc=state_city.xml, TreeNodeXslSrc= did not contain ... If I cut and paste the XML file into the ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: WebControls TreeView Error
    ... you will need to rebuild your dll for the tree control again in order to ... > TreeNodeSrc=state_city.xml, TreeNodeXslSrc= did not contain ... If I cut and paste the XML file into the ...
    (microsoft.public.dotnet.framework.aspnet)