C
cabellm
Hi, I am creating a web feedback form that has a both a checkbox and
listbox on it that are both databound to a database. I have been
researching all day and have found multiple answers for displaying the
results, but none of them work with databound checkbox lists. My
current code is:
Sub Check_Clicked(sender as Object, e As EventArgs)
lblPropTypes.Text = "Selected Item(s):<br><br>"
Dim i As Integer
For i=0 To cblPropTypes.Items.Count - 1
If cblPropTypes.Items(i).Selected Then
lblPropTypes.Text += cblPropTypes.Items(i).Text & ", "
End If
Next
End Sub
<asp:CheckBoxList id="cblPropTypes" runat="server"
datavaluefield="Class" datatextfield="Class"
OnSelectedIndexChanged="Check_Clicked"></asp:CheckBoxList>
Thanks in advance for any help!!
-Cabellm
listbox on it that are both databound to a database. I have been
researching all day and have found multiple answers for displaying the
results, but none of them work with databound checkbox lists. My
current code is:
Sub Check_Clicked(sender as Object, e As EventArgs)
lblPropTypes.Text = "Selected Item(s):<br><br>"
Dim i As Integer
For i=0 To cblPropTypes.Items.Count - 1
If cblPropTypes.Items(i).Selected Then
lblPropTypes.Text += cblPropTypes.Items(i).Text & ", "
End If
Next
End Sub
<asp:CheckBoxList id="cblPropTypes" runat="server"
datavaluefield="Class" datatextfield="Class"
OnSelectedIndexChanged="Check_Clicked"></asp:CheckBoxList>
Thanks in advance for any help!!
-Cabellm