62,254
社区成员
发帖
与我相关
我的任务
分享[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public HttpResponse Response
{
get
{
HttpResponse response = null;
if ((this._context != null) && !this._hideRequestResponse)
{
response = this._context.Response;
}
if (response == null)
{
throw new HttpException(SR.GetString("Response_not_available"));
}
return response;
}
}
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false)]
public HttpContext Context
{
get
{
if (this._context == null)
{
return this._initContext;
}
return this._context;
}
}
可见context.Response 方法是对 context.Context.Response 的封装,多了 if 判断。具体的你自己看吧。
