The href value of the Html anchor tag is rendering weird
- by franko_camron
I want to assign dynamically the href value depending of certain things, I thing is important to mention that I have a Master Page, url routing and I am assigning absolute paths (like http://www.stackoverflow.com/questions/...).
I've tried the following:
<a href="<%= DynamicURL%>">testing urls</a>
<asp:HyperLink runat="server" ID="hpLink">this teset brouw</asp:HyperLink>
and in code behind
hpLink.NavigateUrl = "http://www.someurl.com/morepath/morethisngs";
I have also tried this
<a runat="server" id="aAccesories">Testing ...</a>
and in code behind I do this:
aAccesorios.HRef = "http://www.someurl.com/morepath/morethisngs";
what ever I try when I see the html source code the links render like this:
http://localhost:10027/projectTest/\www.someurl.com/morepath/morethisngs
so I cant create absolute paths or absolute URLS, doesnt matter what I tried, this is weird isnt it? i adds the domain to the urls and then it removes the http:// then it adds the path I wanted
hope you can help me, thanks!