Monday, August 31, 2009

How do you invoke a web method of web service in AJAX?

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

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

Inside JAvascript Use methods of this service directly like
service1.methodname()

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home