c# - Use cookies from CookieContainer in WebBrowser -


is there way can use cookies cookie container (taken webrequest previously) , use them in webbrowser control? if so, how this? winforms application in c#.

you need make use of internetsetcookie. here sample...

public partial class webbrowsercontrol : form {      private string url;       [dllimport("wininet.dll", charset = charset.auto, setlasterror = true)]      public static extern bool internetsetcookie(string lpszurlname, string    lbszcookiename, string lpszcookiedata);       public webbrowsercontrol(string path)      {           this.url = path;           initializecomponent();            // set cookie           internetsetcookie(url, "jsessionid", globals.thisdocument.sessionid);             // navigate           webbrowser.navigate(url);       } } 

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -