随笔 - 35  文章 - 0  评论 - 121  阅读 - 56623
06 2009 档案
在后台类中获取当前page对象
摘要:以前,在后台类里面要获取当前请求的一些信息的时候,就用HttpContext.Current对象,可以获取诸如 Request,Response,Server等针对当前请求的对象,但是如何获得整个page对象,却一直不晓得。 今天在解答别人问题时候,无意中搜索发现,System.Web.UI.Page page = HttpContext.Current.CurrentHandle as System.Web.UI.Page;有什么用? 暂时想到的是可以用 page.ClientScript来注册脚本了,不用HttpContext.Current.Response.Write输出脚本在html 阅读全文
posted @ 2009-06-16 10:15 lindping 阅读(467) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示