Sponsored By
DataConverter
Advertise with Us
Advertisement
Advertise with Us
Follow Us
Follow _MindStick_ on Twitter View MindStick Software's LinkedIn profile View MindStick Software's Facebook profile
Mindstick
Article Article  Forum Forum  Blog Blog  Quiz Quiz  Beginner Beginner  Careers Careers  Contact Contact  Login Login  
Home | Product | Services | About Us | Interview | DeveloperSection | Submit an Article | Submit Blog
Report Abuse Form
Reason:    
   

Home >> .Net >> ASP.Net >> How to create a cookie in ASP.NET
Author Post

Anoop Singh


Total Post: 12
Member Since: 10/8/2010
Points: 62
How to create a cookie in ASP.NET
Posted On: 10/8/2010 7:35:03 AM
I am new in development please guide me to create cookie in ASP.NET
Author Post

Uttam Misra


Total Post: 113
Member Since: 6/2/2010
Points: 818
Re: How to create a cookie in ASP.NET
Posted On: 10/8/2010 7:53:12 AM
Check this article anoop..

http://mindstick.com/Articles/c4e253f5-67dc-4211-8a1f-e29c17ce2943/

// Add this on the beginning of your .cs code file
using System;
 
 
// Use this line when you want to save a cookie
Response.Cookies["CookieName"].Value ="CookieValue";
// How long will cookie exist on client hard disk
Response.Cookies["CookieName"].Expires = DateTime.Now.AddDays(2);

// To add multiple key/value pairs in single cookie
Response.Cookies["EmployeeData"]["FirstName"] = "Mark";
Response.Cookies["EmployeeData"]["LastVisit"] = DateTime.Now.ToString();


Author Post

Uttam Misra


Total Post: 113
Member Since: 6/2/2010
Points: 818
Re: How to create a cookie in ASP.NET
Posted On: 10/8/2010 8:05:09 AM
For more concept...

Click Here

cheers
Report Abuse Form
Reason:    
 
Total Online Users: 7176
Advertisement
MindStick DataConverter
Advertise with Us
  
Copyright © 2013MindStick. All Rights Reserved.