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 is the use of dispose method?

965


What is sdlc process?

931


What are strong names?

979


How to use ipostback?

952


How to comment out asp.net tags?

1011


What is the procedure to handle the process request using mhpm events fired? : asp.net mvc

999


Give a few examples of page life cycle events.

1075


Describe the master page.

912


What is the difference between user control and custom control?

880


How will you load dynamic assembly? How will create assesblies at run time?

880


What is viewstate? What does the "enableviewstate” property do? Whay would I want it on or off?

865


What is the difference between the get method () and post method ()?

930


Why do we use sessions?

948


What is odata in web api?

1030


Explain the difference between globalization and localization techniques

940