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?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the Types of chaching. How to implement caching

1026


COM+ Used ________________ Isolation Level

1957


Which tool you have done?

1928


What is a session http?

926


How does the cookies work in asp.net?

1170


14. What are your Future Plans for Swatz Oils GROUP U.K?

2202


If I am developing an application that must accomodate multiple security levels though secure login and my asp.net web application is spanned across three web-servers (using round-robin load balancing). What would be the best approach to maintain login-in state for the users?

1090


What are sql joins?

995


Just by seeing the signature of the bean how can you specify whether it is a stateful or stateless session bean?

1006


What are client activated objects?

1022


What is asp.net mvc5? : Asp.Net MVC

1029


Explain the main differences between asp and asp.net?

1032


Define the types of configuration files.

983


What is aspect-oriented programming?

1114


Do you know using sql cache invalidation?

1029