
474 Chapter 10 • Developing Web Applications
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.HtmlControls
Imports Microsoft.VisualBasic
After the imported namespaces, there is a declaration of class for our Web
form; this class must inherit from the Page object, thereby exposing the Page
properties and events.Then we have declarations of all the controls placed on the
form with the WithEvents clause so that they can expose their events:
Public Class WebForm1
Inherits System.Web.UI.Page
Protected WithEvents cmdGetDetails As
System.Web.UI.WebControls.Button
Protected WithEvents txtCustomerID As
System.Web.UI.WebControls.TextBox ...