How can we define WebMethod and describe WebService in Ajax. Iam working in ajax and define WebMetod. Can i run ajax programe without the WebMethod?
C#
[WebMethod] public string FetchOrders(string key) { return LoadData(key);; } private string LoadData(string key) { DataSet ds = new DataSet(); ds.ReadXml(this.Context.Server.MapPath("App_Data\\northwind.xml")); ds.Tables["Orders"].DefaultView.RowFilter = "customerid = '" + key + "'"; return RenderResultTable((ds.Tables["Orders"].DefaultView)); }
Mahesh ChandRank #1 · 393.3K reputationPosted Nov 24, 2011, 7:16 AM EST