Is it possible to call a server side buttons click event using javascript or jquery If yes then how to do it
Lets say this is your html:
<input type="button" id="button" value="btn" />
In jquery, you invoke click of button as below:
$("#button").click(); //button is id
And in javascript:
document.getElementById("button").click();
Yes, javascript can do that. I assume you are using ASP.Net
<asp:Button ID="button" runat="server" Text="Test" />
<script>
document.getElementById("<%= button.ClientID %>").click();
</script>
document.getElementById("Button1").click();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With