Razor is a markup syntax not language, that gives the notification of using razor syntax for writing the server side code in the .cshtml file. Using it we can dynamically write the pages as per the requirement.
Page Architecture in a Web application-
1-Pure Page Achitectue i.e. .cs file Employee.cs
2-Mixed Page Architecture i.e .cshtml page that contains html as well as csharp code
Content type/MIME type? Text/html
<script language=”javascript”>--javascript engine
</script>
<style type=”text/css”>--css engine
</style>
Tag/text – HTML engine/text
@HTML.TextBox(“Username”); -- razor engine
Razor can be used to write down the server side dynamic code in the .cshtml / .vbhtml page as per the requirement of the project.
<option>India </option>
<option>China</option>
new SelectList({text=”India” value=”ind”),
Dynamic-we get the data from table/controller supply as viewdata , viewbag and can dynamically load the list,
Using Razor-we can write the program i.e.
1-declaring variable
2-if else condition
3-switch case
4-looping statements
Etc.
Server-Wrb server i.e.IIS server, cassini ,web matrix server
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Razor is a markup syntax not language, that gives the notification of using razor syntax for writing the server side code in the .cshtml file. Using it we can dynamically write the pages as per the requirement.
Page Architecture in a Web application-
1-Pure Page Achitectue i.e. .cs file Employee.cs
2-Mixed Page Architecture i.e .cshtml page that contains html as well as csharp code
Razor can be used to write down the server side dynamic code in the .cshtml / .vbhtml page as per the requirement of the project.
Dynamic-we get the data from table/controller supply as viewdata , viewbag and can dynamically load the list,
Using Razor-we can write the program i.e.
1-declaring variable
2-if else condition
3-switch case
4-looping statements
Etc.
Server-Wrb server i.e.IIS server, cassini ,web matrix server