Most of the times we need to call ASP.NET function or method from the javascript, we can do this, by creating one button (invisible mode) and call that button from the javascript button.
Example:
<div style="display:none; color:green;">
<asp:Button runat="server" id="btnCalling" Onclick="btnJavascriptHandlerMethod" />
</div>
from our java script code we can use client id for at the time of doing action.
var objButton=document.getElementByID("btnCalling");
objButton.click();
If you have any queries Please fell free to ask in comments section.
Example:
<div style="display:none; color:green;">
<asp:Button runat="server" id="btnCalling" Onclick="btnJavascriptHandlerMethod" />
</div>
from our java script code we can use client id for at the time of doing action.
var objButton=document.getElementByID("btnCalling");
objButton.click();
If you have any queries Please fell free to ask in comments section.
Post a Comment
Please give your valuable feedback on this post. You can submit any ASP.NET article here. We will post that article in this website by your name.