Imports System.Drawing
Imports System.Web.UI.WebControls
Imports System.Web.UI.HtmlControls


Public Class events
    Inherits System.Web.UI.Page
    Protected WithEvents checkbox1 As System.Web.UI.WebControls.CheckBox
    Protected WithEvents button1 As System.Web.UI.WebControls.Button
    Protected WithEvents button2 As System.Web.UI.WebControls.Button
    Protected WithEvents radio1 As System.Web.UI.WebControls.RadioButton
    Protected WithEvents label1 As System.Web.UI.WebControls.Label
    
#Region " Web Forms Designer Generated Code "
    
    'CODEGEN: This procedure is required by the Web Form Designer
    'Do not modify it using the code editor.
    Private Sub InitializeComponent()

    End Sub

#End Region

    Protected 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

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

    End Sub

    ' -- trap the event for clicking the radio button
    Private Sub radio1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles radio1.CheckedChanged

        label1().Text = "you checked the RADIO button"

    End Sub

    ' -- trap the event for clicking the checkbox.
    Private Sub checkbox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles checkbox1.CheckedChanged

        label1().Text = "you checked the CHECKBOX"

    End Sub

    ' -- trap the event for clicking the button1
    Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click

        label1().Text = "you clicked  BUTTON 1"

    End Sub

    ' -- trap the event for clicking the button1
    Private Sub button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button2.Click

        label1().Text = "you clicked  BUTTON 2"

    End Sub

End Class
