Solved

File not found in register tag

Posted on 2007-04-04
7
528 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

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…
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 …
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

628 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