Solved

File not found in register tag

Posted on 2007-04-04
7
490 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:lem2802
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

747 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

14 Experts available now in Live!

Get 1:1 Help Now