<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="MyPage" %>
Untitled Page
File: Default.aspx.vb
Partial Class MyPage
Inherits System.Web.UI.Page
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Select Case Me.DropDownList1.SelectedIndex
Case 0
Me.result.Text = "A"
Case 1
Me.result.Text = "B"
Case 2
Me.result.Text = "C"
Case 3
Me.result.Text = "D"
Case 4
Me.result.Text = "E"
Case 5
Me.result.Text = "F"
Case 6
Me.result.Text = "G"
Case 7
Me.result.Text = "H"
Case 8
Me.result.Text = "I"
Case 9
Me.result.Text = "J"
Case 10
Me.result.Text = "K"
Case 11
Me.result.Text = "L"
End Select
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Page.IsPostBack = False Then
Me.DropDownList1.Items.Add("A")
Me.DropDownList1.Items.Add("B")
Me.DropDownList1.Items.Add("C")
Me.DropDownList1.Items.Add("D")
Me.DropDownList1.Items.Add("E")
Me.DropDownList1.Items.Add("F")
Me.DropDownList1.Items.Add("G")
Me.DropDownList1.Items.Add("H")
Me.DropDownList1.Items.Add("I")
Me.DropDownList1.Items.Add("J")
Me.DropDownList1.Items.Add("K")
Me.DropDownList1.Items.Add("L")
End If
End Sub
End Class