Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string name = "";
- int counter = 0;
- //new cookie object created for Q2 with checkboxlist1 for selecting ans
- HttpCookie ans2 = new HttpCookie("cbl1");
- string mstr = "";
- foreach (ListItem li in CheckBoxList1.Items)
- {
- if (li.Selected)
- {
- counter += 1;
- mstr = mstr + counter.ToString();
- name = li.Text;
- ans2.Values.Add(mstr, name);
- }
- }
- Response.Cookies.Add(ans2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement