O'Reilly logo

A Programmer's Guide to .NET by Alexei Fedorov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

6.5. Web forms pages

Web forms is the technology that allows us to create programmable web pages that comprise the ASP.NET application. A web form – commonly referred to as an ASP.NET or ASPX page – consists of two components: visual elements and code. With ASP.NET we have two ways to create our pages. We can continue to work the “ASP way” – to mix our code and HTML code – or completely separate them. The latter is called the code-behind technique and it works in the following way:

  • we create a .VB or .CS file that contains all the code;

  • this code can be compiled and placed in the \bin directory;

  • we can force the compilation on demand by using the src attribute of the @ Page directive.

Let’s look at an example. Suppose we want to partition our ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required