Friday 31 August 2012

checkbox.checked | listbox.item | radiobutton.cheked in vb.net

How to write vb.net code to check check box and select listItem item and add them.
    Private Sub Buttonon_Click() Handles Button1.Click

        listboxvalue.Items.Add("First Name=" + TextBoxvalue1.Text + " Last Name=" + TextBoxvalue2.Text + " Address=" + TextBoxvalue3.Text + " City="
        + ComboBox1.Text + "\nSex=")

        If (radiobuttonvalue.Checked = True) Then
            listboxvalue.Items.Add("Male")
        Else
            listboxvalue.Items.Add("Female")
        End If

        listboxvalue.Items.Add(" Age=" + NumericUpDown1.Value.ToString() + " Hobbies are=")

        If (chkvalue1.Checked = True) Then
            listboxvalue.Items.Add(" Cricket")
        End If

        If (chkvalue2.Checked = True) Then
            listboxvalue.Items.Add(" Football")
        End If

        If (chkvalue3.Checked = True) Then
            listboxvalue.Items.Add(" Tennis")
        End If

        If (chkvalue4.Checked = True) Then
            listboxvalue.Items.Add(" BasketBall")
        End If
    End Sub
End Class
Share This
Previous Post
Next Post

FYJC XI standard online admisson Process and declaraton of Merit list . Cut off List For prevous year also . 10 Th Results onlne declaraton Maharashtra Region .

0 comments: