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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access