I've got a couple of ASP.Net Usercontrols that I am using in different locations of my new website. These usercontrols had links like this :
<a href="daily/panchang/"></a>
If the usercontrol is used in pages in various subdirectories the relative path just doesn't work, and I don't want to provide my full website name in the path. So I did this
<a href="~/daily/panchang/" runat="server">
and now the ASP.Net '~' marker works correctly to resolve the root path.
Is it okay to mark all my HTML tags where I have the need to resolve the root path with runat="server" or do you know of a better, HTML way?
Thanks