passing checklistbox values from one form to anathor
Hello, I have generated dynamic checkedlistbox on one form. i check random no of checkboxes and i want to pass all selected checkboxes from one to other form. please suggest answer..
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sukesh MarlaPosted Sep 6, 2012, 12:38 PM
then loop the panels child controls and then create a list of all checked Ids.
Consider you have form 1 with button 1
in button click
{
create list as explained -->List
Form2 ff=new Form2(x);
x.show();
}
public class Form2:Form
{
public List
public Form2( List
{
SelectedIds =x;
}
}
CHeck this is coreect answer if it helped
Sukesh MarlaPosted Sep 7, 2012, 12:40 PM
varsha waghmodePosted Sep 7, 2012, 6:18 AM
Dorababu MekaPosted Sep 7, 2012, 3:51 AM
In form1 button Click
Dorababu MekaPosted Sep 6, 2012, 7:30 AM
varsha waghmodePosted Sep 6, 2012, 7:04 AM
thanks for your help, but i am using C#.net and working with winforms. your solution might work in asp.net.
Sukesh MarlaPosted Sep 6, 2012, 6:30 AM
Now simply use one of the state management mechanism like quesystring,session and pass values to next page,
Check this is correct answer if it helped.