Please check the attached code. It's not working. I have done my code from below link:-
http://www.dotnetfunda.com/articles/article1317-how-to-create-a-simple-model-in-aspnet-mvc-and-display-the-same-tutorial-.aspx
Please help me.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sandeep Singh ShekhawatPosted Jul 20, 2013, 2:40 AM
Changes:
Model path in View
Create new Customer Folder in view
Modify global.asax.cs file
Preeti AgrawallaPosted Jul 20, 2013, 12:47 AM
Sandeep Singh ShekhawatPosted Jul 19, 2013, 10:37 PM
Change the Controller value from "Home" to "Default1" in RegisterRoute() method under global.asax.cs file. like
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Default1", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
}
I have attached updated code it
You can get more example from here
http://www.c-sharpcorner.com/UploadFile/3d39b4/getting-started-with-razor-view-engine-in-mvc-3/
OR
below link has basic application in MVC 2
http://www.c-sharpcorner.com/UploadFile/3d39b4/creating-your-first-Asp-Net-mvc-application/
Thanks,
Sandeep