hi
I have checkbox in page that save these checkbox value in cookies and show checkboxs text into label
below is codes:
protected void Imgorder_Click(object sender, ImageClickEventArgs e)
{
if (CheckBox1.Checked)
{
Response.Cookies["order"]["Name"] = CheckBox1.Text;
}
if (CheckBox2.Checked)
{
Response.Cookies["order"]["age"] = CheckBox2.Text;
}
if (CheckBox3.Checked)
{
Response.Cookies["order"]["sex"] = CheckBox3.Text;
}
}
GetUsersInfo();
and
string GetUsersInfo()
{ string roll;
roll = Request.Cookies["order"]["Name"];
roll = roll + " " + Request.Cookies["order"]["age"];
roll = roll + " " + Request.Cookies["order"]["sex"];
message.Text = roll;
return Request.Cookies["order"].Value;
}
here in message.Text=roll
it will show checkboxs selected text but now I want it count cookies["order"] and in message.text shows count of cookies
i.e:
if users select checkbox 1 and checkbox 2 in message.text shows : 2
how can do it?
Best regards
Neda