Solved

File not found in register tag

Posted on 2007-04-04
7
498 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
7 Comments
 
LVL 17

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

862 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now