hi,
In my application cookies not passing values one page to another page after uploading the web server but on local server it is working properly.
i use for adding cookies
HttpCookie cookie = new HttpCookie("Preferences");
cookie["Location"] = DropDownList1.SelectedValue;
cookie["Range"] = DropDownList2.SelectedValue;
cookie["Roomtype"] = DropDownList3.SelectedValue;
cookie["rooms"] = DropDownList4.SelectedValue;
cookie["Adult"] = DropDownList5.SelectedValue;
cookie["Children"] = DropDownList6.SelectedValue;
cookie["checkin"] = TextBox1.Text;
cookie["checkout"] = TextBox2.Text;
Response.Cookies.Add(cookie);
and for retriving
HttpCookie cookie = Request.Cookies["Preferences"];
if (cookie != null)
{
a = cookie["Location"];
b = cookie["Range"];
c = cookie["Roomtype"];
d = cookie["rooms"];
i = cookie["Adult"];
i1 = cookie["Children"];
g = cookie["checkin"];
h = cookie["checkout"];
}
Loading
vipin sainiPosted Jun 18, 2010, 6:11 AM
CrishPosted Jun 18, 2010, 5:22 AM
Request.Cookies["Preference"].Value