1. Home
  2. Computing & Technology
  3. Visual Basic

ASP.NET - Learn Programming for the Networked World - Part 2

By , About.com Guide

6 of 7

The Page Object

Even more of your work is done for you if you use Visual Studio .NET to create the system. From a programming point of view, coding a VB.NET application in ASP.NET is almost the same as coding it for a regular Windows app. But there are some very important differences too. Keep in mind that because the server actually runs the event code in ASP.NET, any action required takes another "round trip" to the server. For this reason, events like onmouseover - which could be triggered hundreds of times in a very short time - aren't supported.

Probably the most important object in the ASP.NET model is something called the Page class. All .aspx pages are turned into executable programs that "inheret" from an object in the .NET Framework called System.Web.UI.Page. Because your page becomes an instance of the Page class, every time a round trip to the server is executed, your page goes through a specific set of processing steps to initialize, process, render, and dispose the programming objects in the Page class. You use page level events to get your program code to execute at the right times.

We've already seen this at work in some of the examples we have looked at so far. For example, when a page is loaded, the Page_Load event handler is triggered and all the event code for that event is executed. In addition, your program can use the Page class's properties, such as IsPostBack, IsValid, Request, Response, Session, Cache, and others.

Explore Visual Basic
By Category
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Visual Basic
  4. Learn VB.NET
  5. Learn ASP.NET
  6. ASP.NET - Learn Programming for the Networked World - Part 2

©2009 About.com, a part of The New York Times Company.

All rights reserved.