Xaqron
Xaqron

Reputation: 30837

How to get response headers from WebBrowser control in .NET?

After WebBrowser.Navigate() how to retreive response headers returned by server ?

Upvotes: 3

Views: 8491

Answers (2)

Sheng Jiang 蒋晟
Sheng Jiang 蒋晟

Reputation: 15261

You can register a temporary pluggable namespace handler for the http protocol to record the conversations with the server so you can look up them when you need to. See http://google-gears.googlecode.com/svn/trunk/gears/localserver/ie/http_handler_ie.cc and http://www.codeproject.com/KB/miscctrl/csEXWB.aspx for examples.

Upvotes: 1

Hans Passant
Hans Passant

Reputation: 941208

I don't think that's possible. A web page is made up of many HTTP requests and responses. You'd have to download the HTML yourself with HttpWebRequest. Its Headers property gives you access to the response headers.

Upvotes: 1

Related Questions