Tuesday, 9 August 2011

How to invoke a server-side function from JavaScript in asp.net

Use  the code:

function check()
{
  document.getElementById("btnSAVE").click();
           or
  __doPostBack(document.getElementById('btnSAVE').name,'')
}

protected void btnSAVE_Click(object sender, EventArgs e)
{
  BusinessLogic.SaveDate();
}



Tag: calling server method from javascript, calling serverside method from javascript using asp.net, How to invoke a server-side function from JavaScript in asp.net

No comments:

Post a Comment

Parsing JSON w/ @ symbol in it

To read the json response like bellow @ concatenated with attribute                             '{ "@id": 1001, "@name&q...