How do you create a permanent cookie?
Answers were Sorted based on User's Feedback
Answer / surya beniwal
write this cod on submit button : ..........
HttpCookie objCookie = new HttpCookie("UserCookie");
objCookie.Values.Add("UserName", TextBox1.Text);
objCookie.Values.Add("UserPass", TextBox2.Text);
//for permanent cookie .......
objCookie.Expires = DateTime.MaxValue;
Response.Cookies.Add(objCookie);
Response.Redirect("Default2.aspx");
Is This Answer Correct ? | 7 Yes | 1 No |
Answer / vimal
by setting the expiry property greater than
datetime.minvalue.....
Is This Answer Correct ? | 2 Yes | 0 No |
How to compare two strings with out Case sensitive ?
What?s the difference between Response.Write() andResponse.Output.Write()?
How can we pass info between 2 asp.net pages?
I have a method written in WebForm (means .aspx page) & now I want to call this method in WebUserControl (means .ascx page) what should I have to do?
In your ASP.NET 2.0 web application you want to display an image that is selected from a collection of images. What approach will you use to implementing this?
What are the Types of session management in ASP.NET
What is the difference between mvc and asp.net? : Asp.Net MVC
What is the difference between Debug.Write and Trace.Write? When should each be used?
what is value type to reference type
6 Answers AG Technologies, IBM,
Why and where this web.config file is used?
How do I send e-mail from an ASP.NET application ?
Which namespace do the classes, allowing you to support COM functionality, are located?