-1

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.

Index.cshtml

@{
    ViewBag.Title = "Index";
    Layout = "Null";
}

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Index</title>
</head>
<body>
    <div>
        <p>Welcome to the first application of MVC</p>
    </div>
</body>
</html>

firstcintroller.cs

namespace mvcapp.Controllers
{ 
    public class firstController : Controller
    {
        // GET: first
        public ActionResult Index()
        {
            return View();
        }
    }
}
Imran Sh
  • 1,623
  • 4
  • 27
  • 50

1 Answers1

0

Make sure the controller name is “first” in yout RouteConfig.cs file in App_Start folder.

And, create a folder with name “first” file in Mvc\Views folder and place Index.cshtml inside first folder and execute the project.

For more information, find below URL:

ASP.NET MVC Page Won't Load and says "The resource cannot be found"

Community
  • 1
  • 1
Balanjaneyulu K
  • 3,660
  • 5
  • 24
  • 45