how to access asp listbox's checkbox

81 Views Asked by At
     if (lstbx_formname.Items[i].Enabled==true)
            {
                if (lstbx_formname.Items[i].Selected) 
                {
                    if (hh == "")
                    {
                        hh = "" + lstbx_formname.Items[i].Value + "";
                    }
                    else
                    {
                        hh = hh + "," + lstbx_formname.Items[i].Value + "";
                    }
                }                             
            }

// i have listitems which are disabled and now while looping i want skip disabled and unchecked listitem and get checked items in listbox

    if (lstbx_formname.Items[i].Enabled==true)
            {
                if (lstbx_formname.Items[i].Selected) 
                {
                    if (hh == "")
                    {
                        hh = "" + lstbx_formname.Items[i].Value + "";
                    }
                    else
                    {
                        hh = hh + "," + lstbx_formname.Items[i].Value + "";
                    }
                }                             
            }
0

There are 0 best solutions below