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.