DateTime expiration = DateTime.Now.AddDays(5);
string cookie = string.Format("ad={0};expires={1}", txtCookie.Text, expiration.ToString("R"));
HtmlPage.Document.SetProperty("cookie", cookie);
Read All Cookies in Silverlight
var cooks = HtmlPage.Document.Cookies.Split(';');
foreach (var s in cooks)
{
cook = s.Split('=');
MessageBox.Show(cook[1]);
}
This also can easily access cookies by asp.net.
No comments:
Post a Comment