Posted on: 5/8/2015 10:02:36 AM | Views : 581


hi all
iam trying to insert  and retrieve multiple values from single column from database
column property in the data base is text[]
when user selects multiple items in the listbox then that values has to be inserted in the database in single column as (a,b,c,d)
and also that values has to be displayed in the grid from database as 
a
b
c
d
my code for inserting
StringCollection sc = new StringCollection(); int count = ListBox1.Items.Count; foreach (ListItem item in ListBox1.Items) { if (item.Selected) { sc.Add(item.Text); HiddenField1.Value += item.Text + " ,"; ;------------------------its displaying as {"a,b,c,d,"}(after d also , is displaying } }
query = string.Format("INSERT into userinfo (username,password,emailid,roleid,page_credentials[1]) values ('" + txtuname.Text + "','&q ...

Go to the complete details ...