Aaron Cronje

Aaron Cronje

  • NA
  • 256
  • 261.9k

WebMethod in AJAX

Nov 24 2011 11:47 AM
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)