Ajax passes the implementation code of multiple parameters _ajax related

Source: Internet
Author: User

This example for you to share the Ajax transfer of multiple parameters of the specific code for your reference, the specific contents are as follows

 

Webservice1.asmx

Using System;
Using System.Collections.Generic;
Using System.Linq;
Using System.Web;


Using System.Web.Services; namespace ajax11 {///<summary>///WebService1 Summary description///</summary> [WebService (namespace = "http:// tempuri.org/")] [webservicebinding (ConformsTo = wsiprofiles.basicprofile1_1)] [System.ComponentModel.ToolboxItem (
  FALSE)]//To allow the use of ASP.net AJAX to invoke this Web service from a script, uncomment the downlink. [System.Web.Script.Services.ScriptService] public class WebService1:System.Web.Services.WebService {[Webmetho
    D] public string HelloWorld () {return ' Hello world '; [WebMethod] public string ValidateUser (string username) {if (username = = "Onlifes") {R
      Eturn "User name is already occupied, please select another";
      else {return "can be used, please continue";
    } [WebMethod] public string GetDate () {return DateTime.Now.ToString ("Yyyy-mm-dd hh:mm:ss"); [WebMethod] public string Login (string username, String pwd) {if (username = = "Admin" && pwd = = "888888") {return "true";


    else {return ' false ';}

 }
  }
}

The above is the entire content of this article, I hope to help you learn.

Related Article

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.