Tuesday 2 April 2013

Difference Between Razor View Engine and ASPX View Engine

View Engine is responsible for rendering the view into html form to the browser.
By default, Asp.net MVC support Web Form(ASPX) and Razor View Engine.

Razor uses @ symbol to make the code like as:

 @Html.ActionLink("Login", "Login")

Webform uses <% and %> delimiters to make the code like as:

 <%: Html.ActionLink("Login", "Login") %> 

 One of the advantages of using Razor is that you can have a Razor parser run against any string, where aspx needs an httpcontext and other heavyweight elements

No comments:

Post a Comment