Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving CheckBoxList contents

Status
Not open for further replies.

dpanattoni

IS-IT--Management
Jan 29, 2002
76
0
0
US
I have a program that has one .aspx page. On this .aspx page is a CheckBoxList control.

The program will, depending on the user, dynamically create 3-5 different sets of data that will be shown to the user in the CheckBoxList one screen at a time.

I currently have the program successfully able to dynamically create the 3-5 CheckBoxLists and then, one page at a time, copy the contents of these lists to the one control, as shown below:

CheckBoxList1.DataSource = QuestionAnswerList1.DataSource;
CheckBoxList1.DataTextField="Desc";
CheckBoxList1.DataValueField="Code";
CheckBoxList1.DataBind();

Of course, QuestionAnswerList1 is a different name depending on the function called.

My question is, how do I save the CheckBoxList1 back to the QuestionAnswerList1. I have tried doing the reverse of the above code, but when I do, the next time CheckBoxList1 is changed, the prior QuestionAnswerList1 is also changed.

Any suggestions would be greatly appreciated.
Thanks,
DP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top