Solved

File not found in register tag

Posted on 2007-04-04
7
520 Views
Last Modified: 2012-06-27
what the heck am I doing wrong here...this is a simple path

<%@ Register TagPrefix="aiu" Tagname="Footer" Src="../../Atest/Components/Footer.ascx"%>

That's inside my default.aspx

The structure is this:

c:\MySolution1\ATestProject\Atest\default.aspx

the header and footer are in
c:\MySolution1\MainWebProject\components\header.ascx

Why is it saying it cannot find the header?  Is it because I'm trying to grab it from a different project?

0
Comment
Question by:dba123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 18

Expert Comment

by:Elvio Lujan
ID: 18851564
if you have diferent projects then you need to write the entrie path

<%@ Register TagPrefix="aiu" Tagname="Footer" Src="file://c:/MySolution1/MainWebProject/components/Footer.ascx"%>
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 18851623
You cannot get content from outside of that project into another.

Bob
0
 
LVL 4

Expert Comment

by:jasco4617
ID: 18851628
It appears that when  you do relative linking that (with the ../) it does not allow you actually leave the asp.net application.  The reason is that is looking for a virtual path and a virtual path is relative to the root of the application.   you also can't do something like "~/../../filename".

You will need to put the custom control inside you application's virtual directory.
0
 
LVL 1

Author Comment

by:dba123
ID: 18852745
yea, well, I'm not hard coding a path like that to a c drive first off....very bad practice.

Second, I found out what they are doing was to add a virtual directory to the project to point to whatever directory in another in IIS then the application knows about it.  But the weird thing is, I can build my project but even though Intellisense complains abou tthe path, it ends up working becasue once the page is rendered to the browser, that virtual directory exists so that it can find that folder found in the other project.

To me this sounds messy.
0
 
LVL 1

Accepted Solution

by:
dba123 earned 0 total points
ID: 18891524
what I did was to add it as a key in the webconfig as ~/components/whatever

and then it worked fine
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question