I need to create a simple view with 3 links on it ( Administration type page ), I tried adding a View called index to a Directory called Administration but when I try to navigate to it it throws a resource not found error. I am brand new to MVC coming from Web Forms so sorry if this is a stupid question ;)
2 Answers
Firts Add a controller which will come with Index method. Right click on Index Method and select Add View. Add all Html you want to add in that view and your page is ready without adding a Model.
1 Comment
You need to have a controller to render the view.
For instance, if you had an AdminController with a method similar to something like public ActionResult Index() { return View(); } this would render the index view where you could place your html/links etc.
The view itself doesn't need a model this way as you are not supplying anything when returning the View().
You could then navigate to the page by http://xxx/Admin/Index or, 'http://xxx/Admin/'.
It is well worth looking around SO and other various websites for MVC queries!
Good luck.