Click here to Skip to main content
15,905,587 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
here i am using checklist box but when i run the program i got error.....

here my save code is...

cmd.Parameters.AddWithValue("@servicetype",STservice.ToString());


checklist code...

C#
STservice = string.Empty;
       foreach (ListItem item in this.CBLservicetype.Items)
           if (item.Selected)
               STservice += item + ", ";



If u find any solution kindly help me... thank you
Posted

1 solution

Hi,

It should be
item.Value + " "

or
item.Text + ", "

based on your requirement.

Not the below one.
item + ", "


Regards,
RelicV
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900