1
Answer

WebMethod in AJAX

Aaron Cronje

Aaron Cronje

12y
1.6k
1
Hi
 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?

[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)); } 



Answers (1)
Next Recommended Forum