4
Answers

cheched value from checkbox show one by one on label

protected void ddsize_SelectedIndexChanged(object sender, EventArgs e)
{
List<String> lbl_Size = new List<string>();
List<String> lbl_Size1 = new List<string>();
foreach (System.Web.UI.WebControls.ListItem item in ddsize.Items)
{
if (item.Selected)
{
lbl_Size.Add(item.Text);
lbl_Size1.Add(item.Text);
lbl_size1.Text = " $: " + String.Join(",", lbl_Size.ToArray());
lbl_size2.Text = " $: " + String.Join(",", lbl_Size.ToArray());
lbl_size1.Visible = true;
lblprice.Visible = true;
txt_price.Visible = true;
txt_pricesize2.Visible = true;
lbl_size2.Visible = true;
}
}
}
Answers (4)