ASP.NET MVC3 アプリケーションに取り組んでいます。
ビューでは、Home という名前のフォルダーと Index という名前のビューを作成しました。
次に、Controller HomeController を作成しました。
私が追加したコントローラーで:
public ActionResult Index()
{
return View();
}
しかし、アプリケーションを実行すると、次のエラーが発生します。
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /
アドレスバーに /Home/Index を追加すると、ビューが正常に読み込まれます。
ロード時にアプリケーションが自動的にホーム/インデックスに移動するようにするにはどうすればよいですか?
助けてくれてありがとう