Ask Dr. Dotnetsky - Cookies problem in silverlight 2.0

divya rocks posted at 08-Apr-08 06:42

hi.

how to remove cookies in silverlight application...!!

i have on login page(aspx) in  taht button click  i create cookies .

before that i  write code in pageload for deleting  cookies  like

HttpCookie hc = new HttpCookie("");

button click

HttpCookie hc = new HttpCookie(userdetails[0], userdetails[1]);

hc.Expires = DateTime.MinValue;

Response.Cookies.Add(hc);

 

i call this cookie in xaml page(silverlight 2.0)

 

using System.Windows.Browser;

  string  str = string.Empty;

str = HtmlPage.Document.Cookies;

Empid = str.Split('=')[1];

 

}

private static string _empid = string.Empty;

public static string Empid

{

get { return UserDetails._empid; }

set { UserDetails._empid = value; }

}

. here my problem  is  i  have logout button in xaml page.. when  i click it i redirected to login page..., again  i login with another username and password..,  in  string str, it showing old values and new values... how to delete cookies when i log out..

thank u

 


Click here to sign in and reply. You could earn money via our message board contest just for being helpful.
  Cookies problem in silverlight 2.0 - divya rocks  08-Apr-08 06:42 6:42:01 AM
      Cookie - Aravind Kumar  08-Apr-08 07:13 7:13:15 AM
      Delete Cookie - Sanjay Verma  08-Apr-08 11:42 11:42:57 PM
      retrieve and delete cookies within a Silverlight application. - Rakesh Vikram  13-May-08 03:11 3:11:01 AM
View Posts

  

Search

search



Purchase