471,354 Members | 2,096 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,354 software developers and data experts.

shdocVw Browser toolbar set cookie

I am writing a browser toolstrip bar that sits in IE. How do I set a cookie
in the browser for a specific domain before the user navigates to that domain.
I only have access to IE as an SHDocVw.WebBroswerClass
I am trying to set the cookie using

mshtml.HtmlDocument.cookie="name=value;domain=.exa mple.com";

but when I try listening for BeforeNavigate2 event on the browser, the
document field in ShDocVw.IWebBrowser2 is an HTMLDocument in the wrong
domain, so the cookie doesn't get set and is not inlcuded in the request to
the server, and I get an error for not having the cookie.

How have other people gotten around this problem with the shDocVw and mshtml
Jul 31 '08 #1
0 2034

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

22 posts views Thread by Theo | last post: by
3 posts views Thread by Wiktor Zychla | last post: by
reply views Thread by Fab | last post: by
reply views Thread by Alfa & Omega | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.