4
Reply

What is use of view engine in mvc

Sandeep Kumar

Sandeep Kumar

8y
766
0
Reply

    View engine is use to render a web page in the browser ,written in specified programming language

    A view engine is what MVC uses to find and render the views you are requesting from the controller. If you are satisfied with the default routing you probably wont need to change anything, but lets say you wanted to have your shared files usually located in root/views/shared to instead be located in root/common, a custom viewengine is what you will need to create to be able to do that.

    View Engine renders the HTML to the browser. The view engine templates have a different syntax than the implementation. By default ASP.Net MVC supports ASPX and the Razor View Engine. There are many more third-party view engines, like Spark, Nhaml and so on also available for MVC. We can also write our own view engine.

    The responsbilities of view engine in MVC is1. It get the request from controller. 2.It execute the requested page and generate resultset. 3.Generated resultset will be get deliver to user.