J
jack
HI . i have created a cookiie in one page and i am trying to get in
other page .. but not getting to desired result.
im able to create cookie and reade it in the same page but not able to
get or read it on the redirected page ..
below is my code ..
webform1.aspx
private void Button1_Click(object sender, System.EventArgs e)
{
HttpCookie c = new HttpCookie ("mycookies","this is the content of
my cookie");
Response.Cookies.Add (c);
Response.Redirect("WebForm2.aspx");
}
webform2
private void Page_Load(object sender, System.EventArgs e)
{
Response.Write ( Response.Cookies.Count);
Response.Write ( Response.Cookies["mycookies"].Value);
}
other page .. but not getting to desired result.
im able to create cookie and reade it in the same page but not able to
get or read it on the redirected page ..
below is my code ..
webform1.aspx
private void Button1_Click(object sender, System.EventArgs e)
{
HttpCookie c = new HttpCookie ("mycookies","this is the content of
my cookie");
Response.Cookies.Add (c);
Response.Redirect("WebForm2.aspx");
}
webform2
private void Page_Load(object sender, System.EventArgs e)
{
Response.Write ( Response.Cookies.Count);
Response.Write ( Response.Cookies["mycookies"].Value);
}