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

How can u debug your .net application?

1048


What is the difference between exe and dll?

1113


Explain asp.net web forms.

1062


Define reflection in .net?

998


What are custom controls?

922


What is view state management in asp net?

891


What is the use of session in web application?

938


About CLR, reflection and assemblies?

1945


Which is faster viewdata or viewbag?

976


Is global asax mandatory?

970


How to sign out from forms authentication?

1038


Apart from IDE what are the enhancements in asp.net 2.0?

2103


What is a SESSION and APPLICATION object?

1021


What is the difference between custom controls and user controls?

926


How to send a DataReader as a parameter to a remote client ?

3390