how to call a method from jquery

Posted by Klbaiju under jQuery on 7/22/2013 | Points: 10 | Views : 969 | Status : [Member] | Replies : 1
Hi all,
In my application i want to call a serverside method from jquery
here is code
$.ajax({
type: "POST",
// url: "Busbooking.aspx/ConductorTable",
url: "WebService1.asmx/insert1",
data: "{'tourdate':'" + tourdate + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
// alert(msg);
// alert(msg.d);
if (msg.d == "Success") {

//call serverside function
bind();

}

}
});


//srver side code
public void bind()
{
some code

}

my requirement is if msg.d=="Success"
i want to call bind() method
how to solve this

Regards
baiju




Responses

Posted by: Phagu007 on: 7/22/2013 [Member] Starter | Points: 25

Up
0
Down
You can use given code for calling method in JQUERY



public static string ServerSideMethod()

{

return "Your Message from SQL server.";

}

Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response