I have 3 checkboxes and 1 textbox
checkbox1, checkbox2, checkbox3
when i check first checkbox1 and then checkbox3 then in textbox it will appear as 1,3 exactly........ !!
using vb.net only.........
I have 3 checkboxes and 1 textbox
checkbox1, checkbox2, checkbox3
when i check first checkbox1 and then checkbox3 then in textbox it will appear as 1,3 exactly........ !!
using vb.net only.........
Try:
Private Sub CheckBox_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox3.CheckedChanged, CheckBox2.CheckedChanged, CheckBox1.CheckedChanged
Dim sb As New System.Text.StringBuilder
sb.Append(CStr(IIf(CheckBox1.Checked, "1 ", "")))
sb.Append(CStr(IIf(CheckBox2.Checked, "2 ", "")))
sb.Append(CStr(IIf(CheckBox3.Checked, "3 ", "")))
TextBox1.Text = sb.ToString.Trim
End Sub