VB.NET•Explore the Coded Behind Web Page

Listing 4. At the end of the Page_Load, let the parent class (MyBase) load this Panel control.

Public Class MyPage : Inherits PageBase
   Protected ContentScreen As _
      System.Web.UI.WebControls.Panel

Private Sub Page_Load(ByVal sender As _
   System.Object, ByVal e As System.EventArgs) _
   Handles MyBase.Load
   'code for this page.....

   MyBase.Title = "My web page title"
      MyBase.Body.Controls.Add(PageContent)
   End Sub
End Class