Try ~/jobseeker/displayPositionNS.aspx. ASP.NET maps (~) to the root folder
of your site.
>I have a page that is loading a control from another folder. I want the
> references to be from current folder not the folder the control came from.
[quoted text clipped - 29 lines]
>
> Tom
> Try ~/jobseeker/displayPositionNS.aspx. ASP.NET maps (~) to the root folder
> of your site.
No, that wouldn't get me what I am trying to do.
I want "displayPositionNS.aspx" to go to the displayPositionNS.aspx in the
current directory. It could also be
www.staffingworkshop.com\employer\DisplayPositionNS.aspx that uses the .ascx
control. In this case, I would want it to open the file in the employer
site. I need it to look at where the original .aspx file is and use that
folder.
Thanks,
Tom
> >I have a page that is loading a control from another folder. I want the
> > references to be from current folder not the folder the control came from.
[quoted text clipped - 29 lines]
> >
> > Tom
tshad - 31 Jul 2007 17:22 GMT
Also, on the same page I have:
Response.Redirect("displayCompanyOverview.aspx?CID=" & CompanyID.Text)
This one doesn't go the the "Applicant" folder to get
displayCompanyOverview.aspx - it goes to the JobSeeker or Employer folders
to the file (depending on where the original .aspx page was).
Thanks,
Tom
>> Try ~/jobseeker/displayPositionNS.aspx. ASP.NET maps (~) to the root
> folder
[quoted text clipped - 50 lines]
>> >
>> > Tom
tshad - 01 Aug 2007 00:52 GMT
The problem would be even worse if I were to put the Controls in a
/Controls/ folder so that the path to all my controls were in:
/inetpub/wwwroot/stw/controls.
I obviously don't want my links to go to my controls folder to get my pages.
I want them relative to the folder my .aspx folder is.
For example, my page might be in:
/inetpub/wwwroot/stw/jobseeker/ or /inetpub/wwwroot/stw/employer/
and call my control in my /controls/ folder. If I have a hyperlink to
another page, I would want it to get the .aspx page from either the
jobseeker or employer folders depending on where the page I am calling it
from is.
I found that the <asp:hyperlink> has the same problem. The only way around
it seems to be to never use the hyperlink tag and conver all my tables and
links on my pages to do Response.Redirct which works correctly.
Thanks,
Tom
> Also, on the same page I have:
>
[quoted text clipped - 66 lines]
>>> >
>>> > Tom