Ejemplo n.º 1
0
 protected internal virtual void SetJsonp(object data)
 {
     Response.Cache.SetCacheability(HttpCacheability.NoCache);
     Response.ContentType = "application/x-javascript";
     Response.Write(string.Concat("callback(", StaticCallResult.GetJson((data != null) ? -200 : -500, data), ");"));
 }
Ejemplo n.º 2
0
 internal static void SetResult(HttpResponse response, int code, object value = null)
 {
     response.Cache.SetCacheability(HttpCacheability.NoCache);
     response.ContentType = "application/x-javascript";
     response.Write(StaticCallResult.GetJson(code, value));
 }