Solved

File not found in register tag

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
vb.net convert long time to mm:ss 23 35
asp.net web app 3 59
ASP.NET data base connection 35 95
Web Site Administration Tool - Security Questions 2 39
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses

710 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