Razor is clean, lightweight, and syntaxes are easy as compared to ASPX. For example, in ASPX to display simple time, we need to write:
<%=DateTime.Now%>
In Razor, it’s just one line of code:
@DateTime.Now