By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,992 Members | 1,147 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,992 IT Pros & Developers. It's quick & easy.

checkbox list and radio button list

P: n/a
hi all,

I have a form which has checkbox list which has items as below

1) Input 1
2) Input 2
3) Input 3
4) Input 4
5) Input 5

Now if user selects Input2 and Input5 and goes to next page and then comes
back to this page, I want to retain the selected Item that he selected
before. i.e Checkboxlist should display Input 2 and Input 5 as checked and
now if wants to change his selection to Input 1 and Input 5, he can change
his selection and proceed to next page.

My problem is I don't know how to retain the selection that he made
previously. i.e how do i store items that he selected at the first time when
he visited the page.

Same problem with RadioButtonList. :(

Pls help.......
May 19 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
You should use a Session variable. E.g.

Session["selection"] = <selectionValue>;

and in the same page

if (!IsPostback) {
if (Session["selection"] != null ){
ParseSelectionValue(Session["selection"]);
}

Does this help you ?

May 19 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.