Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How do you create a permanent cookie?

Answers were Sorted based on User's Feedback



How do you create a permanent cookie?..

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

How do you create a permanent cookie?..

Answer / vimal

by setting the expiry property greater than
datetime.minvalue.....

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

What are the differences between Trace and Debug?

2 Answers   Accenture,


what is the dllhell? why we use the dllhell?

4 Answers  


To load your generated dataset with data which method do you invoke?

0 Answers   Siebel,


Define session in asp.net.

0 Answers  


Is post back in asp.net?

0 Answers  


What is application variable in asp.net?

0 Answers  


Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines?

2 Answers   Siebel Systems,


What is the parent class of all the web server control?

0 Answers  


What are Http handler ?

6 Answers   Accenture, BirlaSoft, Satyam, Syntel,


What is the difference between page directive include and action tag include?

0 Answers  


In what order do the events of an ASPX page execute. As a developer, why is it important to understand these events?

5 Answers   Syntax Softtech, TCS,


What is the difference between cookie and session?

0 Answers  


Categories