Click here to Skip to main content
15,916,846 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please help me i need to call code behind method in javascript
Give me solution.
Posted

This Code Project article will help you a lot.

Calling a code-behind function from JavaScript[^]

Regards..:)
 
Share this answer
 
 
Share this answer
 
You can use ajax post to call the code behind methods

example below :
C#
$.ajax(
  {
    type: "POST",
    url: "PageName.aspx/MethodName",
    data: , // Add parameter to pass to the method
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    success: function(result) {},
    error :function(ex){}
  }
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900