Razor View and ASPx in MVC

In MVC 5 we have only one way to create View which is Razor View, file extension of razor view is ".cshtml"
But before MVC 5 we had one more option which was ASPX, now in MVC 5 ASPX has been removed and currently Razor view is available with MVC 5.

There were differences in ASPX and Razor view.
We use @{} to write dynamic code in Razor view and <% %> to write dynamic code in ASPx.

How to pass data from Controller to View:

  • ViewBag
  • ViewData
  • TempData

I will discuss about these 3 ways one by one in next blogs.

Next Blog - MVC Versions



What's new in C# 6.0 language - All new features of C# 6.0 for developers

SharePoint Interview Questions and Answers