T
tshad
I had posted this problem earlier and just noticed that the Hyperlink is the
problem.
Apparently, it doesn't figure out the path correctly. It uses the path of
the file it is in, even if it is a control.
I have 2 files "displayCompanyJobs.aspx" and "displayCompanyOverview.aspx"
which are in both the folder "/jobseeker/" and "/employer/".
I have a user control "displayCompanyJobs.ascx" that is in my /applicant/
folder.
I call www.stw.com/jobseeker/displayCompanyJobs.aspx, which will load the
user control /applicant/displayCompanyJobs.ascx. In my control, I have the
following lines:
<a href="displayCompanyOverview.aspx">anchor test</a><br>
<asp:Hyperlink ID="test" Text="HyperLinkTest"
NavigateUrl="displayCompanyOverview.aspx" runat="server"/><br>
Both will put a link on the page. But the links are different. When you
roll over the anchor (a href) it shows:
http://www.stw.com/JobSeeker/displayCompanyOverview.aspx which is correct.
That is where the aspx files are.
But if you roll over the Hyperlink you see:
http://www.stw.com/applicant/displayCompanyOverview.aspx which is not
correct.
If I call the .aspx page from the /employer/ folder:
www.stw.com/employer/displayCompanyJobs.aspx
When you roll over the anchor (a href) it shows:
http://www.stw.com/employer/displayCompanyOverview.aspx which is correct.
That is where the aspx files are.
But if you roll over the Hyperlink you see:
http://www.stw.com/applicant/displayCompanyOverview.aspx which is not
correct. So no matter where I call the control from the Hyperlinks will
always try to jump to the same folder as the Controls.
If all my controls are in one folder and my aspx pages are in a different
folder, you obviously want to go to the folder where the aspx files are.
Anchors (a href) and Response.Redirect do it correctly and Hyperlinks do
not.
This appears to be a bug since Hyperlinks translate into an link (anchor)
tag and you would expect it to work the same.
Why is this and is there a way around this.
Thanks,
Tom
problem.
Apparently, it doesn't figure out the path correctly. It uses the path of
the file it is in, even if it is a control.
I have 2 files "displayCompanyJobs.aspx" and "displayCompanyOverview.aspx"
which are in both the folder "/jobseeker/" and "/employer/".
I have a user control "displayCompanyJobs.ascx" that is in my /applicant/
folder.
I call www.stw.com/jobseeker/displayCompanyJobs.aspx, which will load the
user control /applicant/displayCompanyJobs.ascx. In my control, I have the
following lines:
<a href="displayCompanyOverview.aspx">anchor test</a><br>
<asp:Hyperlink ID="test" Text="HyperLinkTest"
NavigateUrl="displayCompanyOverview.aspx" runat="server"/><br>
Both will put a link on the page. But the links are different. When you
roll over the anchor (a href) it shows:
http://www.stw.com/JobSeeker/displayCompanyOverview.aspx which is correct.
That is where the aspx files are.
But if you roll over the Hyperlink you see:
http://www.stw.com/applicant/displayCompanyOverview.aspx which is not
correct.
If I call the .aspx page from the /employer/ folder:
www.stw.com/employer/displayCompanyJobs.aspx
When you roll over the anchor (a href) it shows:
http://www.stw.com/employer/displayCompanyOverview.aspx which is correct.
That is where the aspx files are.
But if you roll over the Hyperlink you see:
http://www.stw.com/applicant/displayCompanyOverview.aspx which is not
correct. So no matter where I call the control from the Hyperlinks will
always try to jump to the same folder as the Controls.
If all my controls are in one folder and my aspx pages are in a different
folder, you obviously want to go to the folder where the aspx files are.
Anchors (a href) and Response.Redirect do it correctly and Hyperlinks do
not.
This appears to be a bug since Hyperlinks translate into an link (anchor)
tag and you would expect it to work the same.
Why is this and is there a way around this.
Thanks,
Tom