4
Reply

What is the Difference Between Razor & Aspx Engine in MVC?

Mahesh Kumar alanka

Mahesh Kumar alanka

Apr 26, 2014
4.3k
0

    Razor is new view engine came with MVC3 . It gives cleaner syntax and render clean HTML in comparison of Web Forms. Razor syntax is quit different from Web Form or classic asp.

    Anupam Singh
    May 13, 2014
    1

    http://www.c-sharpcorner.com/UploadFile/a20beb/differences-between-razor-and-aspx-view-engine-in-mvc/

    Kml Surani
    April 15, 2015
    0

    Aspx View Engine - This view engine present in MVC 1 and MVC2. Whatever code you want to write in View you need specify like <% string str = "India" %> Razor Veiw Engine- It is supported in versions after MVC3. SYntax for this is like @for(int i=0;i<5;i++) {} Razor view engine code is more concise and clean than aspx view engine. There are mostly syntactical differences between these two view engines.

    Swaraj Patil
    May 20, 2014
    0

    It all boils down to syntax in your webpage view, but ASPX and Razor are pretty different view engines. Razor doesn't depend on the same pipeline that ASPX does. Because of that, I'd consider Razor to be just a parsing engine.One of the advantages of that is that you can have a Razor parser run against any string, where aspx needs an httpcontext and other heavyweight elements.

    Munesh Sharma
    April 28, 2014
    0