HttpWebRequest登入某网站,如何将session对象传给webbrowser,以便webbrowser显示登入后的页面,
请给点代码或基本的实例.谢谢大家

解决方案 »

  1.   

    返回HttpWebRequest请求的结果,就是取其HttpWebResponse 的返回流,设置WebBrowser 的DocumentStream = response.GetResponse().GetResponseStream();
    你自己试试吧~~,不过那就不能正确显示图片了,否则你替换掉所有的图片链接。
      

  2.   

    这样就根脱机是一样的,我需要的是让WebBrowser现实等入后的页面,不是脱机下载的页面,您有无其他方法?
      

  3.   

    CookieContainer  myCookieContainer  =  new  CookieContainer(); 
    string  cookieStr  =  webBrowser1.Document.Cookie; 
    string[]  cookstr  =  cookieStr.Split( '; '); 
    foreach  (string  str  in  cookstr) 
    { } 
    HttpWebRequest  hreq=(HttpWebRequest)HttpWebRequest.Create(""); 
    hreq.Method= "POST "; 
    hreq.ContentType= "application/x-www-form-urlencoded "; 
    hreq.CookieContainer= myCookieContainer;