Hi,
first the background: I have my navigation HTML control hyperlinks in a User Control which is loaded onto my page (it is actually using a template). The Application start page is MyApp/Default.aspx. A user is redirected to a sub directory Default.aspx page upon authentication.
In this case MyApp/Admin/Default.aspx.
MyApp/Admin/Default.aspx is the controller for all "pages" in the Admin web application. All links on the MyAppAdmin/Default.aspx link back to MyAppAdmin/Default.aspx with a param to tell the Default.aspx which control to put into it's main body placeholder. Then the MyApp/Admin/Default.aspx is served back to the browser with the new content in the body.
The Problem:
The first time the MyApp/Admin/Default.aspx is rendered to the Browser, the link urls are correct for example: "On the anchor, the href coded as "Admin/Default.aspx?pageid=2".
Clicking on the link takes me back to MyApp/Admin/Default.aspx correctly and the pageid=2 content is loaded in. However, once reloaded,if I now look at the properties of the hyperlink the href is now " It has added my href on to the now virtual location?
I have tried different combinations in the href. I have also tried programatically to override the setting in the code-behind.Page_Load method of the Navigation control. It didn't have any affect.
Question:
How do I set up my href so that it doesn't add the extra directory on to the URL?
Or, at what point does ASP.NET / IIS put add the virtual path to the href property? and can
I override the value in a method other than Page_Load?
Thanks for any help,
first the background: I have my navigation HTML control hyperlinks in a User Control which is loaded onto my page (it is actually using a template). The Application start page is MyApp/Default.aspx. A user is redirected to a sub directory Default.aspx page upon authentication.
In this case MyApp/Admin/Default.aspx.
MyApp/Admin/Default.aspx is the controller for all "pages" in the Admin web application. All links on the MyAppAdmin/Default.aspx link back to MyAppAdmin/Default.aspx with a param to tell the Default.aspx which control to put into it's main body placeholder. Then the MyApp/Admin/Default.aspx is served back to the browser with the new content in the body.
The Problem:
The first time the MyApp/Admin/Default.aspx is rendered to the Browser, the link urls are correct for example: "On the anchor, the href coded as "Admin/Default.aspx?pageid=2".
Clicking on the link takes me back to MyApp/Admin/Default.aspx correctly and the pageid=2 content is loaded in. However, once reloaded,if I now look at the properties of the hyperlink the href is now " It has added my href on to the now virtual location?
I have tried different combinations in the href. I have also tried programatically to override the setting in the code-behind.Page_Load method of the Navigation control. It didn't have any affect.
Question:
How do I set up my href so that it doesn't add the extra directory on to the URL?
Or, at what point does ASP.NET / IIS put add the virtual path to the href property? and can
I override the value in a method other than Page_Load?
Thanks for any help,