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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sukesh MarlaRank #461 · 5.4K reputationPosted Sep 6, 2012, 8:38 AM EDT
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 MarlaRank #461 · 5.4K reputationPosted Sep 6, 2012, 2:30 AM EDT
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.
varsha waghmode56 reputationPosted Sep 6, 2012, 3:04 AM EDT
thanks for your help, but i am using C#.net and working with winforms. your solution might work in asp.net.
Dorababu MekaRank #457 · 5.5K reputationPosted Sep 6, 2012, 3:30 AM EDT
Dorababu MekaRank #457 · 5.5K reputationPosted Sep 6, 2012, 11:51 PM EDT
In form1 button Click
varsha waghmode56 reputationPosted Sep 7, 2012, 2:18 AM EDT
Sukesh MarlaRank #461 · 5.4K reputationPosted Sep 7, 2012, 8:40 AM EDT