Hi, did anyone know how to insert checkbox lists items into two col in db? Which is mean i had three items in checkbox list, when i checked two items among the three. It will insert the two items into two col in db.
I had this code, but it only insert into one col. How to improve this codes to meet my requirement? Urgent. Thnkx
Dim strSQL As String = " INSERT INTO movieDet ([Title], [des], [Year], [actor1], [actor2], [actor3], [actor4], [branch], [section], [section2],[category], [type], [pic]) VALUES('" & tb_title.Text & "','" & tb_des.Text & "','" & tb_year.Text & "','" & tb_actor1.Text & "','" & tb_actor2.Text & "','" & tb_actor3.Text & "','" & tb_actor4.Text & "','" & CheckBoxList1.SelectedValue & "','" & cl_sec.SelectedValue & "','" & cl_sec.SelectedValue & "','" & RadioButtonList2.SelectedValue & "','" & RadioButtonList3.SelectedValue & "','" & Image1.ImageUrl & "')"
Sorry the codes are a little messy. The checkbox list i'm talking about is cl_sec.SelectedValue . And the field i want to fill indb is section and section2. thnk. Urgent!
I had this code, but it only insert into one col. How to improve this codes to meet my requirement? Urgent. Thnkx
Dim strSQL As String = " INSERT INTO movieDet ([Title], [des], [Year], [actor1], [actor2], [actor3], [actor4], [branch], [section], [section2],[category], [type], [pic]) VALUES('" & tb_title.Text & "','" & tb_des.Text & "','" & tb_year.Text & "','" & tb_actor1.Text & "','" & tb_actor2.Text & "','" & tb_actor3.Text & "','" & tb_actor4.Text & "','" & CheckBoxList1.SelectedValue & "','" & cl_sec.SelectedValue & "','" & cl_sec.SelectedValue & "','" & RadioButtonList2.SelectedValue & "','" & RadioButtonList3.SelectedValue & "','" & Image1.ImageUrl & "')"
Sorry the codes are a little messy. The checkbox list i'm talking about is cl_sec.SelectedValue . And the field i want to fill indb is section and section2. thnk. Urgent!