Home > DeveloperSection > Interviews > How do you invoke a web method of web service in AJAX?

Posted on    March-29-2011 9:47 AM

 1 Answer(s)
  1872  View(s)
Rate this:

Varun Agrawal
Varun Agrawal

Total Post:159

Posted on    March-29-2011 12:00 AM

In order to use a webmethod of a webservice, we need to add the reference of webservice in the <services> section of ScriptManager. Under services you have to configure the servicepath.

<asp:ScriptManager ID="ScriptManager1" runat="server">
<asp:ServiceReference Path="..\service1.asmx" />

Inside JAvascript Use methods of this service directly like

Don't want to miss updates? Please click the below button!

Follow MindStick