How the ASP. NET AJAX client framework calls the Web Service
1:web service class Add [System.Web.Script.Services.ScriptService] Attribute
2: Methods that need to be called asynchronously need to add [WebMethod] Attributes
3, page must be added ScriptManager control (with and unique)
4:scriptmanager Add a servicereference to the corresponding Web service
5: Called in the client using the following format:
[NameSpace]. [ClassName]. [MethodName] (Parm1,parm2,..., callbackfunction);
Comments:
1:system.web.script.services.generatescripttype
2: Custom object needs to meet two conditions A: must have parameterless constructor B: All public properties must be readable and writable (Get,set)
3:[system.web.script.serialization.scriptignore] A property is not disclosed externally, this attribute needs to be added
How the ASP. NET AJAX client framework calls the Web Service