熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

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

2022-06-13   來源: .NET編程 

  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++音頻/視頻技術開發與實戰

[]  []  


From:http://tw.wingwit.com/Article/program/net/201311/16098.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.