using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; // / /// Summary description for WebService /// [WebService(Namespace = "http://tempuri.org/")] [ WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. [System.Web.Script.Services.ScriptService] public class WebService : System.Web.Services.WebService { public WebService () { //Uncomment the following line if using designed components //InitializeComponent(); } [WebMethod] public string HelloWorld( string name) { return "Hello World" name; } }
3. Jquery requests data from ashx The same Js code as on the page:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn