0
假設我有一個名爲「HomeController」的控制器,它繼承自Mvc.Controller。另外說我寫了控制器的構造函數和一些過濾器的一些操作。ASP.NET MVC Controller中的執行順序是什麼?
Public Class ClientController
Inherits System.Web.Mvc.Controller
Public Sub New()
''Some code
End Sub
<SomeActionFilter()> _
Function Index() As ActionResult
Return View()
End Function
End Class
我的問題是:
- 是什麼構造,過濾器,動作的執行順序?
- 如果我不想通過檢查某些條件來運行代碼,我可以爲構造函數過濾嗎?