What is Razor?
Submitted by: Administrator-When we need to include our c# or VB code with the HTML markup within ASP.NET Web pages then sometimes it becomes very tedious. To overcome this problem, Razor was implemented.
-Razor was introduced with ASP.NET MVC 3 to make ease of writing C# or VB code in HTML pages.
-There is no need to use ASP.NET delimiter <%= %>. We can use only “@” character to achieve the same goal.
-For example
<%= DateTime.Now %>
Can be written in Razor simply as
@DateTime.Now
-In razor all syntax starts with “@” and if there is only one line of code then there is no need to use “{“.
-The extension of Razor file is cshtml for C# work environment and vbhtml for Visual Basic work environment.
Submitted by: Administrator
-Razor was introduced with ASP.NET MVC 3 to make ease of writing C# or VB code in HTML pages.
-There is no need to use ASP.NET delimiter <%= %>. We can use only “@” character to achieve the same goal.
-For example
<%= DateTime.Now %>
Can be written in Razor simply as
@DateTime.Now
-In razor all syntax starts with “@” and if there is only one line of code then there is no need to use “{“.
-The extension of Razor file is cshtml for C# work environment and vbhtml for Visual Basic work environment.
Submitted by: Administrator
Read Online ASP.Net MVC Job Interview Questions And Answers
Top ASP.Net MVC Questions
☺ | What is ASP.NET MVC? |
☺ | What is repository pattern in MVC.NET? |
☺ | Explain the page lifecycle of an ASP.NET MVC? |
☺ | Explain program to call the js function when the change is being made in the Dropdown list made in ASP.NET MVC? |
☺ | Explain significance of routing? |
Top Dot Net Technologies Categories
☺ | MSF Interview Questions. |
☺ | .Net Architecture Interview Questions. |
☺ | ASP.Net MVC Interview Questions. |
☺ | Entity Framework Interview Questions. |
☺ | C# (Sharp) Programming Language Interview Questions. |