[VS11] Razor 出現 ASP.Net runtime error

自從電腦灌了 VS 11 beta 和 Visual Studio 2010共存後,MVC的Razor常常出問題…

Razor 特有的 @ 出現無法辨識,錯誤訊息如下:

ASP.Net runtime error.The pre-application start initialization method Start on type System.Web.WebPages.Deployment.PreApplicationStartCode threw an exception with the following error message: Exception has been thrown by the target of an invocation...

Continue reading

[MVC] 入門 Controller

自上篇《第一個ASP.Net MVC程式》之後好一段時間都沒有發文了,趁最近比較有空閒的時間再來把一些東西整理整理再分享給各位。

最近ASP.Net MVC 4 也出Developer Preview版本,所以各位可以至ASP.NET MVC 4 Developer Preview下載最新版本來用用看。筆者接下來將以此版本來教學了。這篇將帶領各位來了解Controller。

Continue reading