我已经能够创建没有代码背后的ASPX页面,但我不能为我的生活找出魔术组合,让ASMX页面无需代码就可以工作.这甚至可能吗?
快速样品:
<%@ WebService Language="C#" Class="SampleWebService" %> using System; using System.Data; using System.Web; using System.Collections; using System.Web.Services; using System.Web.Services.Protocols; [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] public class SampleWebService : System.Web.Services.WebService { [WebMethod] public string Hello() { return "Hello World!"; } [WebMethod] public string DoStuff(out string stuff) { stuff = "Woohoo!"; return "OK"; } }