In this post we will see how to call a server side function from JavaScript.
Hope this helps...
HTML::
<div style="visibility: hidden">
<asp:Button ID="mybtn" runat="Server" onclick="mybtn_Click" />
</div>
Java Script::
var hiddenMyBtn = document.getElementById('<%=
mybtn.ClientID %>');
hiddenMyBtn.click();
Server side code::
protected void mybtn_Click(object sender, EventArgs
e)
{
//Do your stuff
}
Hope this helps...
No comments:
Post a Comment