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
|