NetProgrammingHelp.com
Asp.Net,C#,Ajax,Sql server,silverlight,Javascript codes exambles articles,Programming exambles

Recent Posts

  • How to declare/use global constants (enum’s) in javascript ajax function
  • Silverlight Data Binding OneWay TwoWay Asp.Net C# XAML
  • Accessing Executing Running Stored Procedure/Function/Package Using Linq Silverlight Xaml
  • Creating/Developing Silverlight Data Driven Applications Using Wcf Linq Asp.Net C#
  • Deploying Manually Publish XBAP Wpf Browser Application in IIS Asp.Net C# XAML
  • Creating Server and client using remoting asp.net c#
  • Create/Build wcf autocomplete/autoextender textbox using database linq c# asp.net
  • Essentials for Creating/Developing/Programming silverlight project tools wpf xaml
  • Working with xml data type variable sql server 2008 asp.net c#
  • Encrypting Stored Procedure sql server 2008 asp.net c#
  • Delete Remove Clear All Cookies Using Asp.Net

    Posted by James Categorized Under: ASP.NET Add Comments

    Introduction:
    In this article,i am going to explain about how to delete all the cookies in particular machine using asp.net

    Main:
    Sometimes in secure webpages,we need to clear all client side entries.The below server side code will clear all cookie entries.

    string[] Cookentries = Request.Cookies.AllKeys;
    foreach (string local_cookie in Cookentries)
    { 
    Response.Cookies[local_cookie].Expires = DateTime.Now.AddDays(-1);
    }

    Conclusion:
    Hope this helps,
    Happy Coding.

    Leave a Reply