社区
C#
帖子详情
C# WEB中的HttpContext.Current.Response.Write与Response.Write有什么区别
splory
2006-06-06 10:32:24
如题,请问HttpContext.Current.Response.Write与Response.Write有什么区别
我只知道HttpContext.Current.Response.Write在类库和后台代码库中能用
但Response.Write在类库中好像就不能使用了
...全文
696
10
打赏
收藏
C# WEB中的HttpContext.Current.Response.Write与Response.Write有什么区别
如题,请问HttpContext.Current.Response.Write与Response.Write有什么区别 我只知道HttpContext.Current.Response.Write在类库和后台代码库中能用 但Response.Write在类库中好像就不能使用了
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
10 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
stepday
2010-06-21
打赏
举报
回复
同样期待高手的解答
真相重于对错
2006-06-07
打赏
举报
回复
一样的,你反汇编一下system.web.dll就清楚了
代码太长不全贴了,
private void SetIntrinsics(HttpContext context)
{
this._context = context;
this._request = context.Request;
this._response = context.Response;
this._application = context.Application;
this._cache = context.Cache;
if ((this._clientTarget != null) && (this._clientTarget.Length > 0))
{
this._request.ClientTarget = this._clientTarget;
}
base.HookUpAutomaticHandlers();
}
splory
2006-06-07
打赏
举报
回复
没人知道吗?
继续等待中
splory
2006-06-07
打赏
举报
回复
我想作用应该是一样的
但是他们在不同的地方能不能使用就有点不同了
splory
2006-06-06
打赏
举报
回复
日,一群菜!
sumoon2002
2006-06-06
打赏
举报
回复
么区别
splory
2006-06-06
打赏
举报
回复
类库的意思就是class.cs文件
后台代码库意思就是page的cs文件
晕
Ivony() 说的基本上算是个提示了
ldy_2162
2006-06-06
打赏
举报
回复
没区别
在别的类库用HttpContext.Current.Response.Write就相当是引用
而在页面的.cs文件里包含此命名空间,所以不用引用
linaren
2006-06-06
打赏
举报
回复
Response默认就是HttpContext.Current.Response
你所说的'在类库和后台代码库中'不知什么意思?
Ivony
2006-06-06
打赏
举报
回复
没区别,
你通常写的Response.Write能通过编译是因为Response是Page的一个属性,而你的代码都写在Page里面了……
[
C#
]统计在线人数
dtOnline = (DataTable)System.
Web
.
Http
Context
.
Current
.Application["OnlineTalbe"]; string sessionId = System.
Web
.
Http
Context
.
Current
.Session.SessionID.ToString(); //数据表
中
是否有我的记录 DataRow ...
global.asax
Http
Context
.
Current
.
Response
.
Write
(st); } void Application_End(object sender, EventArgs e) { // Code that runs on application shutdown } void Application_Error(object sender, EventArgs e...
C#
中
一些常用的Js调用大全
C#
中
一些常用的Js调用大全:/// /// 弹出JavaScript小窗口 /// /// 窗口信息 public static void Alert(string message) { #region ...
Http
Context
.
Current
.
Response
.
Write
(js); #endregion }
导出Excel到自定义位置
Http
Response
resp = System.
Web
.
Http
Context
.
Current
.
Response
; resp.Charset = "utf-8"; resp.Clear(); resp.AppendHeader("Content-Disposition", "attachment;filename=" + filename + ".xls"); resp....
System.
Web
.
Http
Context
.
Current
.
Response
.
Write
("成功!!!!!");
System.
Web
.
Http
Context
.
Current
.
Response
.
Write
(“成功!!!!!”);
C#
110,539
社区成员
642,577
社区内容
发帖
与我相关
我的任务
C#
.NET技术 C#
复制链接
扫一扫
分享
社区描述
.NET技术 C#
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧
+ 用AI写文章