title: Setting the cookies to webbrowser control in windows phone
body: <p>I want set the cookie to Webbrowser control before or while navigating to that page. I am able to set the cookie in the Navigated event but i am not able set the cookie in the Navigating event of Webbrowser control.</p>
  
  <p>I am trying below code to set the cookie: </p>
  
  <pre><code> webbrowser.InvokeScript("document.cookie=" + cookie_name+ "=" + cookie_value);
  </code></pre>
  
  <p>If i try the above code i am getting error saying that <strong>"An unknown error has occurred. Error: 80020006."</strong></p>
  
  <p>I even tried below URL to set the cookie on the werbbrowser control but still i am not able to set the cookie on the browser:
  <a href="http://christian-helle.blogspot.in/2012/03/integrating-html5-and-javascript-with.html" rel="nofollow">http://christian-helle.blogspot.in/2012/03/integrating-html5-and-javascript-with.html</a> </p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Here i am trying to set the cookie for the Webbrowser control not for the HttpWebRequest. We can set the cookie for the HttpWebRequest and we can fetch the html but HttpWebRequest.CookieContainer won't set cookie to the Webbrowser.</p>
  
  <p>Thanks in advance.</p>