Sunday 16 May 2021

Render the view outside of view folder in ASP.NET mvc

 In normal case your project views(.cshtml) are in view folder of project but if you want to render the view from another folder with the same functionality of views. Then you have to just copy the web.config of views folder to your new folder and add the respective path like this.

View("~/Content/itemtemplate/Adtemplate.cshtml", model); 



No comments:

Post a Comment