Vasanth Jack

Vasanth Jack

  • NA
  • 289
  • 33.3k

change the Checkboxlist Value similar to FirstCheckboxlist

Feb 6 2017 4:55 AM

I have Two checkBoxlist

One Checkboxlist is bind with Database.

Another Checkboxlist is manually bind from Gridview.

 
foreach (ListItem il in cckk.Items)
{
if (il.Selected)
{
foreach (ListItem ite in checkBox.Items)
{
if (ite.Selected)
{
string newval = ite.Value;
il.Value = newval;
string val = il.Value;

}
}
}
}
 
 
<asp:"checkBox" runat="server" RepeatDirection="Horizontal" AutoPostBack="true"
onselectedindexchanged="checkBox_SelectedIndexChanged">
"cckk" runat="server" RepeatDirection="Horizontal"
onselectedindexchanged="cckk_SelectedIndexChanged" AutoPostBack="true">
 

If the firstcheckboxlist is checked that the Checked value is given to the below checkboxlist.

for example

it is First Checkboxlist

[]Name [.]Address [.]State. So its value is (1,2)

Now the Seconboxlist is

[.]Addr [.]Stat []name.now the actual value of Second checkboxlist is (1,2)

But i want to change the value Beacuse Address checkbox is located in the 2nd place in the firstCheckboxlist

here 1st place in Second checkboxlist

So whenwe check the FirstCheckboc lst

that values is passed to secondcheckbox list

 

Attachment: Picture.rar

Answers (2)