Xpode.com        Click here to Print this article.

C# and .NET Interview questions and answers: - What is Razor and when should we use it?

It’s a light weight view engine. Till MVC we had only one view type i.e.ASPX, Razor was introduced in MVC 3.

Razor is clean, lightweight and syntaxes are each 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

As per Microsoft razor is more preferred because its light weight , can be unit tested and has simple syntaxes comparatively.

Below is an important c# interview question and answers video :- What is the difference between string and stringbuilder?  


See more stuffs on c#  and ASP.NET MVC interview question and answers

Regards,

Click here to view more c# and .NET MVC interview question and answers



http://
http://

Contributed by:
Shivprasad koirala Koirala
I am a Microsoft MVP for ASP/ASP.NET and currently a CEO of a small E-learning company in India. We are very much active in making training videos , writing books and corporate trainings. Do visit my site http://www.questpond.com for .NET, C# , design pattern , WCF , Silverlight , LINQ , ASP.NET , ADO.NET , Sharepoint , UML , SQL Server training and Interview questions and answers

Resourse address on xpode.com
http://www.xpode.com/Print.aspx?Articleid=654

Click here to go on website