HttpContext.Current.Response.Write和Response.Write区别

共同点

HttpContext.Current.Response.Write和Response.Write的意思其实都是一样的都是页面输出,存储在浏览器。

不同点

Response.Write只能在.aspx的page后台使用。

HttpContext.Current.Response.Write则是在类库,接口等文件中使用。在.aspx文件中只要引用 using System.Web; 的命名空间,也同Response.Write一样。

猜你喜欢

转载自blog.csdn.net/q1923408717/article/details/99713089