Sei sulla pagina 1di 4

Partial Class _Default

Inherits System.Web.UI.Page
Protected Sub BulletedList1_Click(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.BulletedListEventArgs) Handles BulletedList1.Click
Select Case (e.Index)
Case 0
Label1.Text = "Quieres entrar a Senati xD"
Case 1
Label1.Text = "Quieres entrar a Google"
Case 2
Label1.Text = "Quieres entrar a Terra"
End Select
End Sub

Partial Class Default2


Inherits System.Web.UI.Page
Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles DropDownList1.SelectedIndexChanged
MultiView1.ActiveViewIndex = DropDownList1.SelectedIndex
End Sub
End Class
Partial Class Default3
Inherits System.Web.UI.Page

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles


Button1.Click
If Not IsNumeric(TextBox1.Text) Then
MsgBox("El dato debe ser un numero")
Else
MsgBox("Correcto")
End If
End Sub
End Class

Partial Class Default4


Inherits System.Web.UI.Page

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Button1.Click
If TextBox1.Text.Trim = "" Then
MsgBox("ingrese un dato")
TextBox1.Focus()
Else
ListBox1.Items.Add(TextBox1.Text)
TextBox1.Text = Nothing
TextBox1.Focus()
End If
End Sub
End Class
Partial Class Default7
Inherits System.Web.UI.Page
Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles DropDownList1.SelectedIndexChanged
MultiView1.ActiveViewIndex = DropDownList1.SelectedIndex
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Button1.Click
If ListBox1.SelectedIndex <> -1 Then
ListBox2.Items.Add(ListBox1.SelectedItem)
ListBox1.Items.RemoveAt(ListBox1.SelectedIndex)
ListBox1.SelectedIndex = -1
ListBox2.SelectedIndex = -1
End If
End Sub
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Button2.Click
If RadioButton1.Checked Then
If RadioButton2.Checked Then
Else
MsgBox("Debe elegir un sexo")
End If
Else
MsgBox("Debe elegir un sexo")
End If
End Sub
End Class

Potrebbero piacerti anche