[英]Run jquery scripts on client side with a HttpHandler (by Implement IHttpHandler)
I have a User Control that need load some jquery scripts in client side, at this time I handle it like this: 我有一个需要在客户端加载一些jquery脚本的用户控件,这时我可以这样处理:
protected override void OnPreRender(EventArgs e) {
Page.ClientScript.RegisterClientScriptInclude("jQueryScriptHeader",
Page.ClientScript.GetWebResourceUrl(this.GetType(), "MyNamespace.js.jquery-
1.6.4.min.js"));
Page.ClientScript.RegisterClientScriptInclude("MyScript",
Page.ClientScript.GetWebResourceUrl(this.GetType(), "MyNamespace.js.MyScript.js"));
}
Also I have a new script that has jQuery.Post() and I think for fire it need a HttpHaandler 我还有一个具有jQuery.Post()的新脚本,我认为为了解雇它需要一个HttpHaandler
How can I do All this with HttpHandler? 我该如何使用HttpHandler进行所有这些操作?
Maybe this can be useful this very like as your problem an have a complete step by step solution: 这可能很有用,就像您的问题一样,有一个完整的分步解决方案:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.