Hi,
I have a multi-choice column in a sharepoint list.
The choices being: Choice 1,Choice 2,Choice 3,Choice 4.
I tried creating a visual webpart, where in i'm trying to update the column programmatically, I have used a checkbox list to select multiple options,
Here is the code:
<asp:CheckBoxList ID="chkTechonology" runat="server"></asp:CheckBoxList>
The code behind to update the item being:
List<string> objList=new List<string>(); foreach (ListItem item in chkTechonology.Items) { if (item.Selected ) { objList.Add(item.Value); } } listItem["Technology"] = String.Join(", ", objList.ToArray()).Trim(';','#');
It gets saved in the list, but the issue is, whenever i try to edit the item in the list, all the selections are gone.
I need to select the options again and then save the item.
Regards,
Sachin