473,324 Members | 2,246 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Duplicate custom controls

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\Temp orary ASP.NET
Files\myproject\4b10f33a\12f97037\2bgwzy1u.dll'

Feb 10 '06 #1
3 1431
DWS
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\Temp orary ASP.NET
Files\myproject\4b10f33a\12f97037\2bgwzy1u.dll'

Feb 10 '06 #2
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" <DW*@discussions.microsoft.com> wrote in message
news:92**********************************@microsof t.com...
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\Temp orary ASP.NET
Files\myproject\4b10f33a\12f97037\2bgwzy1u.dll'

Feb 12 '06 #3
I have no idea how it helps, but I've added ClassName attribute
with different values to both ASCX's Control directive, e.g.
ClassName="ImpRoute"
in one ASCX and ClassName="ExpRoute" in other one.
Now problem disappeared.

"Tumurbaatar S." <sp********@magicnet.mn> wrote in message
news:eS**************@tk2msftngp13.phx.gbl...
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" <DW*@discussions.microsoft.com> wrote in message
news:92**********************************@microsof t.com...
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\Temp orary ASP.NET
Files\myproject\4b10f33a\12f97037\2bgwzy1u.dll'


Feb 13 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Donna Price | last post by:
I have a problem with a database which I've recently separated into several related tables. I have a main data entry form, which has several subforms on it on tabbed pages. The first subform is...
9
by: Mike Moore | last post by:
We have 3 fields on our web form that makeup what could be a duplicate entry. We would like to look at these three fields that the user enters and check in the database to see the information in...
7
by: Shimon Sim | last post by:
I have a custom composite control I have following property
2
by: Suzanne | last post by:
Hi all, I'm reposting this message as I'm experiencing this problem more and more frequently : I really hope someone out there can help me as I've been tearing my hair out on this one for a...
2
by: J R M | last post by:
I've developed a custom control (it's basically a drop-down list and then a couple of textboxes to include meta-data for the selection) that I'm embedding into another custom control (the idea is...
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
2
by: Ron | last post by:
I would like some more information on custom controls, what they can do and things like that, what you would use them for etc... Can anyone here share some examples of what you have used a custom...
6
by: =?Utf-8?B?U2hhcm9u?= | last post by:
Hello gurus, I want to have a Form with a TabControl, this TabControl will contain TabPage that has controls in it, this TabPage is prepared at design time. I want in runtime to duplicate the...
6
by: Arthur Dent | last post by:
Anyone know, in VB.NET (2005) how to prevent duplicate occurrences of the same event handler on an event? e.g... I have some object which raises an event, and some other class which consumes...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.