helllo all ,
today my plroblem i how to Find Multiple Items Selected in ASP.NET Checkbox List on label with remove option
my code is
<asp:CheckBoxList ID="CheckBoxList1" runat="server">
<asp:ListItem Value="0">C#</asp:ListItem>
<asp:ListItem Value="1">SQL Server</asp:ListItem>
<asp:ListItem Value="2">ASP.NET</asp:ListItem>
<asp:ListItem Value="3">WPF</asp:ListItem>
</asp:CheckBoxList>
<br />
<br />
<asp:Label ID="lblRes" runat="server" Text=""></asp:Label>
</div>
on checkboxlist selected index
lblRes.Text = "";
foreach (ListItem lst in CheckBoxList1.Items)
{
if (lst.Selected == true)
{
lblRes.Text += "Selected Item Text: " + lst.Text + " Selected Item Value: " + lst.Value + "<br />";
}
}
when i select multple item then is bind in label,that's fine,but want to bind every item data with remove option ,when any item value remove from label then check item value in checlboxlist and unselect them ,but all value should not remove
please suggest me how to do this or any code .
thanks in advance .