Lorna70
asked on
URLs - relative and the use of ~
Hi I have a file (control) at the root of my website called topbar.ascx which holds all my navigation buttons. The problem is I have sub-folders which also include this control on their pages. Therefore, how do I reference a url from outside and inside a sub-folder? I was advised to use ~. So in my topbar.ascx I have <li><a href="~/blog/default.aspx" >Blog</a>< /li> which you would think would be ok. However, when I view pages including my topbar.ascx inside a browser and rollover a link, my status bar shows:
localhost:xxxxx/websitenam e/blog/~bl og/default .aspx
Why on earth is websitename/blog/ getting added to the front of the url?? Is this an IIS issue? I'm hoping this will be resolved when I publish live but I will be hosting the site on a shared server so maybe I will have the same issue??
Please can someone advise?
localhost:xxxxx/websitenam
Why on earth is websitename/blog/ getting added to the front of the url?? Is this an IIS issue? I'm hoping this will be resolved when I publish live but I will be hosting the site on a shared server so maybe I will have the same issue??
Please can someone advise?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER