473,405 Members | 2,176 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,405 software developers and data experts.

Sharing custom control between projects

Hi all..

I have a solution containing 5 projects, one of which is a custom control.
In one of the projects, I dragged the .ascx file from the custom control
project and dropped it onto a form. I've also referenced the custom control
project. Everything looks good, I can see properties and events, etc. The
solution builds with no errors.

The folder structure loks like this. The folder Fleet is the top level
solution with sub folders each being their own project.

Fleet
+MainMenu
+Search
+Screen1
+Screen2
+Screen3
At run time, when I try to open the page containing the custom control, I
get this error:

The virtual path '/Fleet/Search/ucFleetSearch.ascx' maps to another
application, which is not allowed.

the line causing the error is
<%@ Register TagPrefix="uc1" TagName="ucFleetSearch"
Src="../Search/ucFleetSearch.ascx" %>

How do I use my custom control from the Search project in the Screen1
project?

Thanks
--
Michael White
Programmer/Analyst
Marion County, OR
Nov 19 '05 #1
3 1695
What we've done is create a seperate project, for all the controls. Then
just add a ref to that project to any you want to add the controls to.
Otherwise what you are getting is seperate copies of the control

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Michael" <xxx.xxx.xxx> wrote in message
news:uy**************@TK2MSFTNGP10.phx.gbl...
Hi all..

I have a solution containing 5 projects, one of which is a custom control.
In one of the projects, I dragged the .ascx file from the custom control
project and dropped it onto a form. I've also referenced the custom
control
project. Everything looks good, I can see properties and events, etc. The
solution builds with no errors.

The folder structure loks like this. The folder Fleet is the top level
solution with sub folders each being their own project.

Fleet
+MainMenu
+Search
+Screen1
+Screen2
+Screen3
At run time, when I try to open the page containing the custom control, I
get this error:

The virtual path '/Fleet/Search/ucFleetSearch.ascx' maps to another
application, which is not allowed.

the line causing the error is
<%@ Register TagPrefix="uc1" TagName="ucFleetSearch"
Src="../Search/ucFleetSearch.ascx" %>

How do I use my custom control from the Search project in the Screen1
project?

Thanks
--
Michael White
Programmer/Analyst
Marion County, OR

Nov 19 '05 #2
Thanks Curt..

I believe that is what I'm doing: the custom control is in a project called
Search. Within the same solution, I have another project, Screen1. In the
Screen1 project, I've added a reference to the project Search. I dragged the
ascx from the project Search onto a web form in project Screen1. At run
time, I get the 'virtual path..' error.
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:OT**************@TK2MSFTNGP11.phx.gbl...
What we've done is create a seperate project, for all the controls. Then
just add a ref to that project to any you want to add the controls to.
Otherwise what you are getting is seperate copies of the control

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Michael" <xxx.xxx.xxx> wrote in message
news:uy**************@TK2MSFTNGP10.phx.gbl...
Hi all..

I have a solution containing 5 projects, one of which is a custom control. In one of the projects, I dragged the .ascx file from the custom control
project and dropped it onto a form. I've also referenced the custom
control
project. Everything looks good, I can see properties and events, etc. The solution builds with no errors.

The folder structure loks like this. The folder Fleet is the top level
solution with sub folders each being their own project.

Fleet
+MainMenu
+Search
+Screen1
+Screen2
+Screen3
At run time, when I try to open the page containing the custom control, I get this error:

The virtual path '/Fleet/Search/ucFleetSearch.ascx' maps to another
application, which is not allowed.

the line causing the error is
<%@ Register TagPrefix="uc1" TagName="ucFleetSearch"
Src="../Search/ucFleetSearch.ascx" %>

How do I use my custom control from the Search project in the Screen1
project?

Thanks
--
Michael White
Programmer/Analyst
Marion County, OR


Nov 19 '05 #3
dont drag it from the other app. Add it manually, so that it retrieves it
from the REFERENCE not the physical file.
Either add it in the design mode or add it to the toolbox and drag it form
there

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Michael" <xxx.xxx.xxx> wrote in message
news:O5**************@TK2MSFTNGP12.phx.gbl...
Thanks Curt..

I believe that is what I'm doing: the custom control is in a project
called
Search. Within the same solution, I have another project, Screen1. In the
Screen1 project, I've added a reference to the project Search. I dragged
the
ascx from the project Search onto a web form in project Screen1. At run
time, I get the 'virtual path..' error.
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:OT**************@TK2MSFTNGP11.phx.gbl...
What we've done is create a seperate project, for all the controls. Then
just add a ref to that project to any you want to add the controls to.
Otherwise what you are getting is seperate copies of the control

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Michael" <xxx.xxx.xxx> wrote in message
news:uy**************@TK2MSFTNGP10.phx.gbl...
> Hi all..
>
> I have a solution containing 5 projects, one of which is a custom control. > In one of the projects, I dragged the .ascx file from the custom
> control
> project and dropped it onto a form. I've also referenced the custom
> control
> project. Everything looks good, I can see properties and events, etc. The > solution builds with no errors.
>
> The folder structure loks like this. The folder Fleet is the top level
> solution with sub folders each being their own project.
>
> Fleet
> +MainMenu
> +Search
> +Screen1
> +Screen2
> +Screen3
>
>
> At run time, when I try to open the page containing the custom control, I > get this error:
>
> The virtual path '/Fleet/Search/ucFleetSearch.ascx' maps to another
> application, which is not allowed.
>
> the line causing the error is
> <%@ Register TagPrefix="uc1" TagName="ucFleetSearch"
> Src="../Search/ucFleetSearch.ascx" %>
>
> How do I use my custom control from the Search project in the Screen1
> project?
>
> Thanks
> --
> Michael White
> Programmer/Analyst
> Marion County, OR
>
>



Nov 19 '05 #4

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

Similar topics

3
by: Robert W. | last post by:
I'm embarking on a project that will have both a desktop application and a Pocket PC application. It seems logical to have as much code as possible sitting in a shared project, which would be...
16
by: Robert W. | last post by:
I'm building a solution that has 1 component for the Desktop and 1 component for the Pocket PC. (Though this isn't a mobile question). I have a data library that will be shared on both platforms....
2
by: Matze | last post by:
I have setup Visual Studio to work with a VSS-Server. (Source Off Site) I dont see a way to share and later branch my project. File -> Source Control -> Share is grayed out. What is the best way...
3
by: brynja | last post by:
Hi .. I´m using web user control on my project group. Now i´m using web user control for each project and it works fine, but now I want to share some controls for various project and I dont...
3
by: Shikari Shambu | last post by:
Hi All, I have a situation where multiple applications are sharing some pages/ controls. So, I have a separate common project that has the common pages/ controls. My question is how do I...
2
by: Ajeet YS | last post by:
Hello, We need to share the same user controls among many developers in the same project. How do we achieve this? We have looked into using Custom controls, but they have a very high development...
3
by: darrel | last post by:
Is it practical? I have a site we've been working on where a lot of the objects on the page are usercontrols...the header, the footer, navigation, etc. I need to make a stand-alone mini-site...
4
by: Anders K. Jacobsen [DK] | last post by:
Hi I have some common UserControls i want to share between to sites (on the same mashine but on diffrent virtual paths). right now i have on solution file with aprox 10 projects. 2 of these is...
1
by: Joe | last post by:
While I understand that Server Side Includes still work, I realize it's not the best practice for sharing code such as a common set of includes between screens. In ASP.NET I've already built...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.