Please help, I am new at vb.net and pretty terrible with very little knowledge.
I have a checkboxlist(chklst) with 6 colors.
I have 6 labels...Label1, Label2, etc...
When Button1 is clicked,
I would like to have list item1, if selected, to = Label1.text
I would like to have list item2, if selected, to = Label2.text
and so on.....
Here is my code so far...how do i get each item to its corresponding label?
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Me.IsPostBack = False Then
chklst.Items.Add("Gold")
chklst.Items.Add("Red")
chklst.Items.Add("Blue")
chklst.Items.Add("Yellow")
chklst.Items.Add("Black")
chklst.Items.Add("Orange")
End If
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
Label1.Text = ""
Label2.Text = ""
Label3.Text = ""
Label4.Text = ""
Label5.Text = ""
Label6.Text = ""
Dim lstItem As ListItem
End Sub
Thanks to whoever is willing to help!