Cookie
How we can retrieve cookies stored in system, I need a asp.net program to retrieve existing cookies from system and also when we enter information like user name password in system it will be saved in system and later if i want to retrieve. it could be retrieve. reply as soon as possible.
lakshmipathi vemulaPosted Apr 17, 2012, 3:50 AM
http://www.bestdotnettraining.com/Online/Training/ASP-NET/ASP-NET-State-Management-/51
SenthilkumarPosted Apr 17, 2012, 12:14 AM
In the ASP.Net server side,
int loop1, loop2;
HttpCookieCollection MyCookieColl;
HttpCookie MyCookie;
MyCookieColl = Request.Cookies;
// Capture all cookie names into a string array.
String[] arr1 = MyCookieColl.AllKeys;
// Grab individual cookie objects by cookie name.
for (loop1 = 0; loop1 < arr1.Length; loop1++)
{
MyCookie = MyCookieColl[arr1[loop1]];
Response.Write("Cookie: " + MyCookie.Name + "
");
Response.Write ("Secure:" + MyCookie.Secure + "
");
//Grab all values for single cookie into an object array.
String[] arr2 = MyCookie.Values.AllKeys;
//Loop through cookie Value collection and print all values.
for (loop2 = 0; loop2 < arr2.Length; loop2++)
{
Response.Write("Value" + loop2 + ": " + Server.HtmlEncode(arr2[loop2]) + "
");
}
}
Reading all the cookies in client side javascript,
For more info:
http://www.tutorialspoint.com/javascript/javascript_cookies.htm
http://stackoverflow.com/questions/8315251/how-can-i-get-cookies-from-httpclienthandler-cookiecontainer
http://www.electrictoolbox.com/javascript-get-all-cookies/
Abhimanyu K VatsaPosted Apr 16, 2012, 3:25 PM
sunakshi saxenaPosted Apr 16, 2012, 7:09 AM
Posted Apr 16, 2012, 3:06 AM
http://www.c-sharpcorner.com/uploadfile/puranindia/cookies-in-Asp-Net/
http://www.c-sharpcorner.com/UploadFile/Vipul.Kelkar/working-with-cookies-in-Asp-Net/
http://www.c-sharpcorner.com/uploadfile/annathurai/cookies-in-Asp-Net/default.aspx