473,396 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Reg:Cookies

vinoth82
How to clear browser cookies in code behind ?
Feb 12 '09 #1
2 1271
jg007
283 100+
This should give you a start -, at present it just adds the cookies to a listbox but would be easy to amend to delete them

Expand|Select|Wrap|Line Numbers
  1.  
  2.         private void GetCookies()
  3.         {
  4.           string path = Environment.GetFolderPath(Environment.SpecialFolder.Cookies);
  5.           DirectoryInfo CookiesDirectory = new DirectoryInfo(path);
  6.  
  7.             foreach (FileInfo filex in CookiesDirectory.GetFiles())
  8.                 if (filex.Name != "index.dat")
  9.                 {
  10.                     {
  11.                         listBox1.Items.Add(filex.Name);
  12.                     }
  13.                 }
  14.         }
  15.  
  16.  
Feb 13 '09 #2
thank you very much , it is very helpful for me
Feb 16 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: lothar | last post by:
i want to traverse a set of messages in a Yahoogroups group from a Python program. to get to the messages of the group, one must log in. this presents, i think, two problems, 1) handling the...
0
by: | last post by:
Which of these scenarios is better: A -- User Registers and is returned to the login screen to test his new username ie (email address). A login script checks user name against database....
4
by: futureofphp | last post by:
I need to access a website, Fetch the data, and then logout. Please tell me where I am wrong. I dont think its logging out properly. <? include "Snoopy.class.php"; $snoopy = new Snoopy; ...
1
by: Chris | last post by:
Hi, I want to create a User Control that shows a registration page on first visit, or if the visitor has already registered (this session) shows a list of files for download. I will be using...
2
by: TK | last post by:
I have a trouble to get web resopnse from an aspx page which is secured by Forms Authentication with custom user account database. My client application is a console application but not a browser....
6
by: Rippo | last post by:
I have a problem with the application_error event being fired from my asp.net application with windows 2003 server standard edition. The event fires fine from my test machine (XP) and all works...
2
Inbaraj
by: Inbaraj | last post by:
Hi I have create a cookie as document.cookie=text1.value+" "+text2.value; I am able to retrive the cookies... But i am not able to delete the cookies... Plz help me in deleting the...
8
Inbaraj
by: Inbaraj | last post by:
Hi... I want to Set Get Delete Cookies using javascript i saw in net but i cant understand... Plz help me with sample example..... with reg inba
2
by: jeddiki | last post by:
Hello, I want to create my own index of websites based on my criteria rather than big G's. For example, I might like to index websites according to what they have in their "author" Meta tag (...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.