I have an tag within my listview to direct the user to the profile page
<a class="btn btn-sm btn-default" href="profile.aspx?ID=<%# Eval("ownerID") %>"></a>
The profile page works as I can load it myself. However when I hover over the tag it shows the the correct link that it'll be directed to, but when I click on it, it just refreshes the current page, I've used the tag the same way in different pages and it works but for some reason it does not work here.
What could be the reason why?
答案 0 :(得分:0)
我认为您需要尝试这个锚标记,HREF应该是单引号。
<a class="btn btn-sm btn-default" href='profile.aspx?ID=<%# Eval("ownerID")%>'>For Test</a>