473,473 Members | 1,807 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to get source displayed by axshdocvw.dll as string

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
Nov 15 '05 #1
2 3345
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

Nov 15 '05 #2
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

Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

30
by: Hallvard B Furuseth | last post by:
Now that the '-*- coding: <charset> -*-' feature has arrived, I'd like to see an addition: # -*- str7bit:True -*- After the source file has been converted to Unicode, cause a parse error if a...
0
by: David Elliott | last post by:
I have created an application that loads assemblies (plugins). These plugins are windows forms that have an embedded browser. private AxSHDocVw.AxWebBrowser browser; If I comment out...
3
by: Simon CJC | last post by:
Hello I use AxSHDocVw.AxWebBrowser in a windows application. But sometimes the url I browsed in AxSHDocVw.AxWebBrowser contains error caused by javascript. Can I prevent javascript from running in...
3
by: Michael C | last post by:
Hi all, Quick question about the AxSHDocVw.AxWebBrowser Component. I was wondering if there is a way to view pages generated internally within my application without writing them to disk. For...
2
by: eXtreme | last post by:
Does anyone know how to get the full URL filename from a Microsoft Web Browser control? I can use wbBrowserObj.LoctionURL to get the path but it seems to be missing the file name... I need the...
24
by: ej1002 | last post by:
Hi I have developed a Windows Application(C# Windows Form) which will get the IFrame Source of the page it is navigating using Webbrowser Control. Now I want do this in ASP.Net web application(C#...
6
by: Lascar | last post by:
Is it possible to do something that will change the html before the ie6 displayes the page. Does vb offer any browser access?
0
by: sagar.jawale | last post by:
Hi, In my c# windows application, i am using AxSHDocVw.AxWebBrowser. I am displaying a generated receipt html in this browser. Also, for printing the same html, i am using the following command...
2
by: =?Utf-8?B?R2F1cmF2?= | last post by:
I am using a simple batch file that takes 3 args to create a .pdf file, and then view that PDF file using on the Microsoft's Web Browser control (AxSHDocVw.AxWebBrowser): {...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.