public void ProcessRequest(HttpContext context) { List <Hospital> list = bll.GetHospital(); string json = JSONConvert.Object2Json(list); context.Response.ContentType = "text/plain"; context.Response.Write(json); }
public void ProcessRequest(HttpContext context) { string json = ""; string bid = context.Request["BID"]; Patience p = bll.GetPatient(bid); json = JSONConvert.Object2Json <Patience>(p); context.Response.ContentType = "text/plain"; context.Response.Write(json); }