There is a very small bug in the MVC 4 Empty Template that can be seen when you create a new MVC 4 Application with an "Empty" template and start adding views for CRUD operations (using scaffolding). And when you run the application and try to navigate (to http://localhost:port/controller/Create or http://localhost:port/controller/Edit) in "Edit.cshtml" and "Create.cshtml" views, you get the following error:
Now, if you open the "Edit.cshtml" and "Create.cshtml" views, you will notice something missing there.
So, why is this issue occuring?
As a developer we expect to run a template (empty, internet, intranet etc) at the very beginning, I guess you are thinking the same. From my point of view, the MVC product team forgot to pack a pre-release version of the "Optimization" pack with the "Empty" template; other templates work fine.
How do you fix this?
Look, there are some even worse alternatives:
First One: You can delete the above codes (in red rectangular box) and then running your application will work. But the jQuery validations of any new entry or editing will no longer be available for you on the view.




Euclides MatussePosted Jan 3, 2016, 8:49 AM
Hi Abhimanyu K Vatsa, Thanks a lot its run sucessufly.