I used the following code to try to add a label as my web page loads
but I can't see anything.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'1.Create an instance of the control and set its properties, as shown in the following example:
Dim myLabel As New Label()
myLabel.Text = "Sample Label"
myLabel.ForeColor = Drawing.Color.AliceBlue
'2.Add the new control to the Controls collection of a container already on the page, as shown in the following example:
Dim Panel1 As New Panel()
'Because the Controls property is a collection, you can use the AddAt method to place the new
' control at a specific location — for example, in front of other controls. However, this can introduce
' errors into the page. For details, see Dynamic Web Server Controls and View State.
Catch ex As Exception