Thanks for the response. I've found an earlier post from Justin Rogers
which also solves the problem:
string contents = null;
string url = "http://www.microsoft.com";
HttpWebRequest wreq = (HttpWebRequest) WebRequest.Create(url);
using(HttpWebResponse wresp = (HttpWebResponse) wreq.GetResponse()) {
using(StreamReader sr = new StreamReader(wresp.GetResponseStream())) {
contents = sr.ReadToEnd();
sr.Close();
}
wresp.Close();
}
Ken
"kalpesh" <sh*********@hotmail.com> wrote in message
news:56**************************@posting.google.c om...
If I am correctly interpreting this, you want to get the source behind
the loaded page, right ?
If yes, import the HTML Object library (mshtml.dll). Load the page
into browser using webbrowser1.navigate2, catch an event that will
tell the state that the page is loaded completely
And then
Dim doc As HTMLDocument
Set doc = WebBrowser1.Document
msgbox(doc.childNodes(0).innerHTML)
HTH
Kalpesh
"Ken Arway" <ka****@worldnet.att.net> wrote in message
news:<e9*************@TK2MSFTNGP11.phx.gbl>...
Using VS2003, .NET1.1 and C# windows form app, I'm successfully
displaying web pages using the axshdocvw.dll. Now I want to capture the source
displayed in the window as a text string. Any ideas? I can't find any
properties or methods that will do this...
Thanks,
Ken