Tips and tricks for .NET using ASP and VB code.

Dynamically add a warning to the top of a web page without an existing text box

Dim WarningTextBox As New TextBox
WarningTextBox.ID = "WarningTextBox"
WarningTextBox.Width = New Unit("97%")
WarningTextBox.BackColor = Drawing.Color.Red
WarningTextBox.Font.Size = 24
WarningTextBox.Font.Bold = True
WarningTextBox.Text = "Warning text to the user goes here."
Form1.Controls.AddAt(0, WarningTextBox)

No comments:

Post a Comment

Search This Blog