Share via


ASP.NET Web Pages with Razor Syntax

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

ASP.NET Razor syntax is a simple programming syntax that lets you embed server-based code into a Web page that can also contain HTML markup, CSS information, and client script (JavaScript). 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 using a simplified syntax that's easier to learn if you are a beginner and that makes you more productive if you are an expert. Even though this syntax is easy to use, its family relationship to ASP.NET and the .NET Framework means that as your Web applications become more sophisticated, you have the power of the larger frameworks 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 that the page might contain. From the browser's perspective, client content that is generated by your server code is no different than any other client content.

Topic

Description

Getting Started with ASP.NET Pages

The WebMatrix book provides information about how to install, program, and manage Web sites using ASP.NET Razor syntax and using the WebMatrix development environment.

ASP.NET Web Pages Reference

The information in this section describes the public namespaces, classes, and interfaces that support ASP.NET Razor syntax.

See Also

Other Resources

Microsoft WebMatrix