Web Pages-2(Web Pages+Razor)

Author:Suresh Garikina

ASP.NET Web Pages and the new Razor syntax provide a fast, approachable, and lightweight way to combine server code with HTML to create dynamic web content. Web Pages taking advantage of Razor syntax is defined as Web Pages 2(version 2)

ASP.NET Web Pages with Razor syntax is a programming framework for creating web applications. It is included as part of Microsoft WebMatrix 2, which is a free development environment. Web Matrix has a page editor, a database (SQL Server Compact), and a Web server for testing (IIS Express). It also includes other tools to help you create and manage sites. If you like, you can create web pages that use ASP.NET Razor syntax in Visual Studio, which provides additional features like a debugger.

ASP.NET Razor syntax uses a simple programming syntax that lets you embed server-based code into a web page. The page can also contain HTML markup, CSS information, and client script (JavaScript and jQuery). Razor syntax is based on ASP.NET, which is the part of the .NET Framework that's specifically designed for creating web applications. Razor syntax gives you all the power of ASP.NET, but it uses a simplified syntax that's easier to learn if you are a beginner. If you're an expert, it makes you more productive. Even though this syntax is easy to use, its relationship to ASP.NET means that as your web applications become more sophisticated, you have the power of the larger framework available to you.

When a page runs that has Razor code in it, the server runs that code before it sends the page to the browser. By running on the server, the code can perform tasks that can be more complex to do using client content alone, such as accessing server-based databases. Most importantly, server code can dynamically create client content. It can generate HTML markup or other content on the fly and then send it to the browser along with any static HTML in the page.

Note: I'd really appreciate any feedback on whether you think the project will be more feasible if it covers few more topics/features. Leave comments or email me at gsuresh.coolguy720@gmail.com

Last edited Mar 11, 2013 at 6:52 AM by gsuresh, version 7