Help with Cookies, Simple Problem
Hey if anyone could offer a noob some help here, that would be great!
I'm new to Web Developer, but I know C# like the back of my hand.
I've started a website that has two forms, Login.aspx and Default.aspx.
There is a link on Default.aspx to the Login.aspx, which has a button and a textbox. Clicking the button runs the following code:
Response.Cookies["name"].Value = TextBox1.Text;
Button1.Text = Response.Cookies["name"].Value;
Response.Cookies["name"].Expires = DateTime.Now.AddDays(1);
I know this code works, because the button's text changes.
But, on the Default.aspx form the code:
Label1.Text = Response.Cookies["test"].Value;
The Label1.Text changes to be blank.
Is this a problem because I'm running locally?
Any help would be great!
|All times are GMT +5.5. The time now is 16:35.|