asp.net

位置:IT落伍者 >> asp.net >> 浏览文章

ASP.NET MVC 4框架揭秘:Controller(2)[2]


发布日期:2024年08月28日
 
ASP.NET MVC 4框架揭秘:Controller(2)[2]

public class HomeController : Controller

{

public new HttpResponse Response

{

get { return SystemWebHttpContextCurrentResponse; }

}

protected override void Execute(RequestContext requestContext)

{

ResponseWrite(Execute() <br/>

baseExecute(requestContext)

}

protected override void ExecuteCore()

{

ResponseWrite(ExecuteCore() <br/>

baseExecuteCore()

}

protected override IAsyncResult BeginExecute(RequestContext requestContext

AsyncCallback callback object state)

{

ResponseWrite(BeginExecute() <br/>

return baseBeginExecute(requestContext callback state)

}

protected override void EndExecute(IAsyncResult asyncResult)

{

ResponseWrite(EndExecute() <br/>

baseEndExecute(asyncResult)

}

protected override IAsyncResult BeginExecuteCore(AsyncCallback callback

object state)

{

ResponseWrite(BeginExecuteCore() <br/>

return baseBeginExecuteCore(callback state)

}

protected override void EndExecuteCore(IAsyncResult asyncResult)

{

ResponseWrite(EndExecuteCore() <br/>

baseEndExecuteCore(asyncResult)

}

public ActionResult Index()

{

return Content(Index()<br/>

}

}

返回目录ASPNET MVC 框架揭秘

编辑推荐

ASP NET开发培训视频教程

Microsoft NET框架程序设计视频教程

Java程序性能优化让你的Java程序更快更稳定

Visual C++音频/视频技术开发与实战

[] []

               

上一篇:ASP.NET开发宝典:注释ASPX文件中代码

下一篇:ASP.NET MVC 4框架揭秘:Controller(2)[1]