![]() |
|
|
|
#1 |
|
I have 2 applications in my web site. The root application and a sub
application. I want them to share certain items like my header and footer user controls. How do I do this? When ever I try and reference a file in the main appliaction I get the below error. Parser Error Message: The virtual path '/mainproject/header.ascx' maps to another application, which is not allowed. I don't want to combine them to one application because the sub project is a forum and I would like to have its own web.config, etc... -- Bill Bill |
|
|
|
|
#2 |
|
Posts: n/a
|
Hi,
You can share custom server controls between appliccations. http://www.15seconds.com/issue/040421.htm Natty Gur[MVP] blog : http://weblogs.asp.net/ngur Mobile: +972-(0)58-888377 *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! Natty Gur |
|
|
|
#3 |
|
Posts: n/a
|
Thanks but I need a user control since 90% of the functionality is just
plain HTML. I don't want to write code just to print out all the tags. It would also be hard to modify the HTML and format it later. I found this article on how to do it but that is what I was doing and it yields the same error: http://support.microsoft.com/default...b;en-us;324785 Bill "Natty Gur" <> wrote in message news:%23aJ$... > Hi, > > You can share custom server controls between appliccations. > http://www.15seconds.com/issue/040421.htm > > Natty Gur[MVP] > > blog : http://weblogs.asp.net/ngur > Mobile: +972-(0)58-888377 > > > *** Sent via Developersdex http://www.developersdex.com *** > Don't just participate in USENET...get rewarded for it! Bill |
|
|
|
#4 |
|
Posts: n/a
|
FYI, I found the solution.
If you create a sub project and make it an application and try to share a user control from the root project then you will get the error "Virtual Path maps to another application, which is not allowed." So what you must do is create a virtual directory for the sub project under the main project but do not make it an application. This is what I tried first but I was getting an error saying that the namespace of the sub project was not found. To resolve this you must add the sub project as a reference to the main project. Once I did this it all worked well. Just though I would share this incase anyone else had the same problem. > Thanks but I need a user control since 90% of the functionality is just > plain HTML. I don't want to write code just to print out all the tags. It > would also be hard to modify the HTML and format it later. > > I found this article on how to do it but that is what I was doing and it > yields the same error: > http://support.microsoft.com/default...b;en-us;324785 > > Bill > > "Natty Gur" <> wrote in message > news:%23aJ$... > > Hi, > > > > You can share custom server controls between appliccations. > > http://www.15seconds.com/issue/040421.htm > > > > Natty Gur[MVP] > > > > blog : http://weblogs.asp.net/ngur > > Mobile: +972-(0)58-888377 > > > > > > *** Sent via Developersdex http://www.developersdex.com *** > > Don't just participate in USENET...get rewarded for it! > > Bill |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sharing Files on a Network Help!!! | bnw | General Help Related Topics | 1 | 08-29-2006 09:10 PM |
| networking (permissoins file share problem ) | Scotech | A+ Certification | 4 | 05-18-2006 08:53 PM |