Accessing Cookies From Windows Forms

Hi,

I'm embedding a windows form within a web page. Is there anyway of being able to acess the cookies in the web page from the windows forms? I can pass them in as parameters but I was wondering whether I could access them directly from the form.

Thanks

Phil.

[267 byte] By [codefund.com] at [2008-3-3]
# 1
Nope - better to pass them as params.

Okay, amendment - you *can* do this *if* you can get a hold of the IHTMLDocument2 interface for the page. This currently requires (1) passing the DOM explicitly into the embedded control and (2) asserting Full Trust (to enable unmanaged code permissions). I'd recommend writing the page to pass them along inside PARAM tags, or stripping them from the URL (which you can obtain by enumerating the control's Evidence).

-J-

codefund.com at 2007-9-8 > top of Msdn Tech,Windows Forms,ClickOnce and Setup & Deployment Projects...