Adding a Web Page

One of the fundamental concepts in ASP.NET is programmatically generated web pages, more commonly known as dynamic web pages, or simply dynamic pages. A dynamic page mixes program logic (in our case, C# code) with HTML to create content that will be displayed in a client browser. Such a page is dynamic because the code portions of the web page are evaluated for each browser request, allowing you to produce different content. This is in contrast to static content, such as a regular HTML files or an image file, where the same content is always sent to the users’ browsers.

ASP.NET supports two different, but related, models for combining program logic and HTML: using code blocks or using code-behind files. We’ll explore both of ...

Get Applied ASP.NET 4 in Context now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.