在非aspx.cs文件中使用response.write

来源:互联网 发布:linux查看tomcat进程 编辑:程序博客网 时间:2024/05/06 15:23

参考如下代码


这里的HttpContext是System.Web名字空间下的。通过HttpContext.Current我们还可以点出下面常见的对象或类:

HttpContext.Current.Response
HttpContext.Current.Request
HttpContext.Current.Server
HttpContext.Current.Request.Cookies

另外还包含以下对象:Application、ApplicationInstance、Cache、Error、Items、Trace、User,具体使用方法可以自己去参考MSDN并试验。 

0 0
原创粉丝点击