public static ScriptInfo Get(JavaScript script)
 {
     return _scriptInfos[script];
 }
 public static string UrlFor(Control control, JavaScript script)
 {
     var scriptInfo = _scriptInfos[script];
     return control.Page.ClientScript.GetWebResourceUrl(scriptInfo.GetType(), scriptInfo.ResourceName);
 }
示例#3
0
 /// <summary>
 /// 输出JS文本到客户端
 public static void WriteJavaScript(this HttpResponseBase Response, JavaScript script)
 {
     Response.ContentType = "text/html";
     Response.ContentEncoding = Encoding.UTF8;
     Response.Write(script.ToString());
 }