Search code examples
c#visual-studio-2013viewasp.net-mvc-5create-view

Create CRUD views without creating a controller


In a C# MVC5 Internet application, is it possible to create the CRUD views for a controller, without creating a controller.

I am asking this as I already have a controller, but I have changed the model structure, so I wish to just create the views.

Is this possible? if so, how can I do this? I am using VS2013 Express Web Edition.

Thanks in advance


Solution

  • Yes u can definitely do that but keep a check on followings things :

    1.) The name of the folder having views is same as the controller name

    2.) The folder having views should have the same no of views as the actionresults in the controller.

    3.) The folder having views should have the same name of views as the names of the actionresults in the controller.