I have 2 identical buttons same proprieties, with the difference that 1 is asp button and another one is HTML button, I am trying to redirect to another page, and HTML button works fine, but asp button does not redirect for some reason. I already recreated asp button to see if it is visual studio bug, but it is not. I don't need to use asp controls, but just want to know what i am doing wrong. here is my code example:
HTML Button
<button type="button" id="Btn_16"
class="btn btn-block btn-lg btn-danger butao" onclick="see_16()">16 </button>
asp Button
<asp:Button ID="Btn_16" runat="server" Text="16"
CssClass="btn btn-block btn-lg btn-danger butao" OnClientClick="see_16()" />
DIV like a button (Also works)
<div id="Btn_16" class="btn btn-block btn-lg btn-danger butao" onclick="see_16()">16</div>
All the controls have the same name, but in my code they are commented, so that is not the problem.
see_16 javascript function :
function see_16() {
{
window.location.href("16.aspx");
};}