I want to call a function from my code behind using javascript. I used the below code:
function fnCheckSelection() {
some script;
window["My"]["Namespace"]["GetPart"](null);
}
...where "GetPart"
is the function name. However, this is not working. Please help me on this.
in JavaScript:
document.getElementById("btnSample").click();
Server side control:
<asp:Button runat="server" ID="btnSample" ClientIDMode="Static" Text="" style="display:none;" OnClick="btnSample_Click" />
C#
protected void btnSample_Click(object sender, EventArgs e)
{
}
It is easy way though...
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments