I have a strange problem with the page I'm developing. I have a link like this:
<a id="asel1" runat="server" href="#"><img id="isel1" runat="server" src="/Images/selbar/1.jpg" /></a>
And when I look at the source code on the resulting page, I get the following:
<a href="../Cards/#" id="ctl00_ContentMainSection_CardsControl1_asel1"><img src="/Images/selbar/1.jpg" id="ctl00_ContentMainSection_CardsControl1_isel1" /></a>
My goal was to programmatically insert a link, if applicable to the page in question, and leave href = "#" if it wasn’t (basically an empty anchor tag). However, now this will lead to the actual link, which, of course, does not exist.
How can I make it do this?
source
share