Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
Node is saved as draft in My Content >> Draft
  • Difference between Razor Engine and Aspx Engine

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 54
    Comment on it

    Razor and ASPX both are engines are used for designing and defining the HTML part in your application.

    While working with normal websites we go with the ASPX engine

    While working with new kinds of project like MVC we use Razor engine for  it.

     

    ASPX engine always starts with a tag <% %> and Razor engine is identified by @.

     

    <%foreach (var student in Students)
    { %>
                     <% if (student.IsPassed)
                     { %>
                              <%=student.Name%> promoted to next Grade.
                   <% }else{ %>
                              <%=student.Name%> not promoted to next Grade.
                   <% } %>
    <% } %>

     

    @foreach (var student in Students)
    {
                @if(student.IsPassed)
                 {
                       @student.Name promoted to next Grade.
                 } else {
                      @student.Name not promoted to next Grade.
                 }
    }

     

    Razor View Engine
    1. Razor view is introduced new in the programming world.

    2. File extensions used by razor is different .It uses .cshtml and .vbhtml.

    3. Razor have easy syntax that make our programming and coding more effective.

    4.Razor syntax are easy to learn.

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

    5. Razor Engine support TDD (Test Driven Development) since not dependent on System.Web.UI.Page class.

     

    Web Form View Engine

    1. It is the default view engine from the early time.

    2. I has .aspx extension and .vspx extension.

    3. Web Form Engine has the same syntax like Asp.net Web Forms uses for .aspx pages.

    4.It uses the syntax <%%> through which it is identified

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


    5. Web Form Engine doesn't support TDD (Test Driven Development)  dependent on System.Web.UI.Page class.

    .net

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: