How the ASP. NET AJAX client framework calls the Web Service

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.