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), ");")); }
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)); }