protected void Page_Load(object sender, EventArgs e) { string uid = Request.QueryString["uid"]; string cbk = Request.QueryString["callback"]; if (string.IsNullOrEmpty(uid)) { Response.Write(cbk + "({\"value\":null})"); Response.End(); return; } DnFile df = new DnFile(); string json = df.all_uncmp(int.Parse(uid)); if (!string.IsNullOrEmpty(json)) { json = HttpUtility.UrlEncode(json); json = json.Replace("+", "%20"); json = cbk + "({\"value\":\"" + json + "\"})"; } else { json = cbk + "({\"value\":null})"; }; Response.Write(json); }
protected void Page_Load(object sender, EventArgs e) { string uid = Request.QueryString["uid"]; string cbk = Request.QueryString["callback"]; if (string.IsNullOrEmpty(uid)) { this.toContentJson(cbk + "({\"value\":null})"); return; } DBConfig cfg = new DBConfig(); DnFile db = cfg.downF(); string json = db.all_uncmp(int.Parse(uid)); if (!string.IsNullOrEmpty(json)) { json = HttpUtility.UrlEncode(json); json = json.Replace("+", "%20"); json = cbk + "({\"value\":\"" + json + "\"})"; } else { json = cbk + "({\"value\":null})"; }; this.toContentJson(json); }