Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ビューフォルダーのcshtmlで@modelを使用できますが、この別のフォルダーをログイン操作に使用したいです。
Account フォルダーに cshtml ファイルを作成しますが、@model を使用できません。次のようなエラーが発生しました。
You need to provide the class that will be used as the model for this view, ie.
@model MyApp.Web.Models.ViewModels.AccountModel
If you don't need a strongly-typed model in this view just delete @model declaration.
@model
http://weblogs.asp.net/scottgu/archive/2010/10/19/asp-net-mvc-3-new-model-directive-support-in-razor.aspx