Difference Between MVC Razor View Engine and ASPX View Engine

Razor View Engine and ASPX View Engine

        Razor View Engine          ASPX View Engine
The namespace for Razor Engine is System.Web.Razor.
The namespace for Webform Engine is System.Web.Mvc.WebFormViewEngine.
Razor Engine is an Advanced View Engine that was introduced with MVC3.This is a New Markup Syntax.
Web Form Engine is the Default View Engine for the Asp.net MVC that is included with Asp.net.
Razor Engine is  slower than Webform Engine.
Webform Engine is  Faster than  Razor Engine.
Razor syntax are easy to learn and clean than Web Form syntax. Razor uses @ symbol.

@Html.ActionLink("", "")
Webform uses <% and %> delimiters

<%: Html.ActionLink("", "") %>
I.Razor Engine, doesn't support design mode in Visual Studio .

II.Razor Engine prevents XSS attacks (Cross - Site Scripting Attack).

III.Razor Engine support  Test Driven Development (TDD).
I.Web Form engine support design mode in Visual Studio.

II.Web Form Engine does not prevent XSS attacks (Cross - Site Scripting Attack).

III.Web Form Engine doesn't support Test Driven Development (TDD).


Post a Comment