Option Strict On

 

Imports MonoSoftware.Web.TextBox

 

Public Class TextBoxExample1

    Inherits System.Web.UI.Page

 

#Region " Web Form Designer Generated Code "

 

    'This call is required by the Web Form Designer.

    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

 

    End Sub

    Protected WithEvents DateTextBox1 As MonoSoftware.Web.TextBox.DateTextBox

    Protected WithEvents TimeTextBox1 As MonoSoftware.Web.TextBox.TimeTextBox

    Protected WithEvents IntegerTextBox1 As MonoSoftware.Web.TextBox.IntegerTextBox

    Protected WithEvents DecimalTextBox1 As MonoSoftware.Web.TextBox.DecimalTextBox

    Protected WithEvents DateTimeTextBox1 As MonoSoftware.Web.TextBox.DateTimeTextBox

    Protected WithEvents TextBox1 As MonoSoftware.Web.TextBox.TextBox

    Protected WithEvents lblValueChanged As System.Web.UI.WebControls.Label

    Protected WithEvents btnPostBack As System.Web.UI.WebControls.Button

 

    'NOTE: The following placeholder declaration is required by the Web Form Designer.

    'Do not delete or move it.

    Private designerPlaceholderDeclaration As System.Object

 

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init

        'CODEGEN: This method call is required by the Web Form Designer

        'Do not modify it using the code editor.

        InitializeComponent()

    End Sub

 

#End Region

 

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        'Put user code to initialize the page here

    End Sub

 

    Private Sub TextBox_ValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DateTextBox1.ValueChanged, TimeTextBox1.ValueChanged, IntegerTextBox1.ValueChanged, DecimalTextBox1.ValueChanged, DateTimeTextBox1.ValueChanged, TextBox1.ValueChanged

        If lblValueChanged.Text = "" Then lblValueChanged.Text = "The value has changed in the following textboxes: <br><br>"

        lblValueChanged.Text += "<i>" + CType(sender, Control).ID + "</i> value has changed to <i>" + IIf(CType(sender, BaseTextBox).ValueIsNothing = True, "Nothing", CType(sender, BaseTextBox).DataBaseValue).ToString + "</i><br>"

        lblValueChanged.Text += "(<i>ToSqlString</i> method returns MS Sql query string <i>" + CType(sender, BaseTextBox).ToSqlString + ")</i>"

        lblValueChanged.Text += "<br><br>"

    End Sub

 

End Class