473,774 Members | 2,232 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.a scx' maps to another
application, which is not allowed.

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

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 1720
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******** ******@TK2MSFTN GP10.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.a scx' maps to another
application, which is not allowed.

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

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_da rkfalz.com> wrote in message
news:OT******** ******@TK2MSFTN GP11.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******** ******@TK2MSFTN GP10.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.a scx' maps to another
application, which is not allowed.

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

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******** ******@TK2MSFTN GP12.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_da rkfalz.com> wrote in message
news:OT******** ******@TK2MSFTN GP11.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******** ******@TK2MSFTN GP10.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.a scx' maps to another
> application, which is not allowed.
>
> the line causing the error is
> <%@ Register TagPrefix="uc1" TagName="ucFlee tSearch"
> Src="../Search/ucFleetSearch.a scx" %>
>
> 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
2852
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 referenced and utilized by both the Windows Forms application and the Mobile Device application. Are there any "gotchas" (ie. warnings) that anyone knows about in following this approach? Robert W. Vancouver, BC
16
2256
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. So I've adopted the approach of having two projects share the same set of files. In my case, I have two similarly named projects: DataObjects DataObjectsCF The former is for the Desktop app and the latter is for the Compact Framework.
2
1393
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 then to share/branch? SOS-Client is 3.5.3 / Server is 3.5.2 I had some bad experiences doing VSS-actions with a client different than VS.NET for VS .NET projects. So i realy would like to use VS .NET
3
1374
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 know how? I have created a folder beside all my project and put one control there. I know how to go up one folder with the "~/" tag but how can I go up two folders? I´ve tried ~/~/, ~/../, ../~/ but I cant make it work.
3
2793
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 reference these pages/ controls from my ASP.NET web projects WEbApp1 url http://localhost/app1 C:\Apps\App1
2
1081
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 time & at times can be complicated. How can we have a set of user controls, say in a separate project, and make use of it from there instead of copying the controls to each individuals project & then using it? We are VS.NET 2003 if its of any...
3
1169
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 that should not be connected to the larger project, as it will be maintained by a different group by hand. So, I was just going to copy over a few of the controls and place them in here. Of course, that's easy, but not ideal, as now I have...
4
1650
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 webprojetcs wich need to shere some common userControls. Optimally i want a class libarary project wich contains the controls so i could import the DLL and use the controls. But that of course doesnt work.
1
1511
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 several User Controls and such for sharing code between screens, but this typically was used things such as menus and headers and footers. What is the best practice in 1.1 for sharing code such as a common set of functions used by multiple screens?
0
9621
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10267
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10106
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7463
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5358
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4014
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2852
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.