<asp:CheckBoxList ID="lstAccessories" runat="server" DataTextField="AccessoryCode" DataValueField="AccessoryID" CellSpacing="5" CellPadding="30" RepeatLayout="Table" RepeatColumns="3" Width="95%" RepeatDirection="Horizontal" >EnableViewState="false" </asp:CheckBoxList&> how to solve it here is codeBehind code:- <pre lang="vb">Dim strAcc As String = String.Empty For Each item In lstAccessories.Items Dim objCAccessory As New CAccessoryCodes If item.Selected Then objCAccessory.AccessoryID = item.value &#39;objCAccessory.AccessoryCode = objCAccessory.AccessoryCode + &quot;,&quot; + item.Text objCAccessory.AccessoryCode = item.Text If objCAccessory.AccessoryCode &lt;&gt; Nothing Then strAcc = IIf(strAcc = String.Empty, objCAccessory.AccessoryCode, strAcc + &quot;,&quot; + objCAccessory.AccessoryCode) End If &#39;If AccessoryCodes = &quot;&quot; Then &#39; AccessoryCodes = item.value &#39;Else &#39; AccessoryCodes = AccessoryCodes &amp; &quot;,&quot; &amp; item.value &#39;End If &#39;objCWOrder.objHandset. objCWOrder.Accessories.Add(objCAccessory) End If Next</pre></pre>
Page.IsPostback
If (IsPostback) 'checkboxlist databind code End If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)