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

Home Posts Topics Members FAQ

load HTML into Microsoft Web Browser control

I am loading a page in the constructor of my form to the Microsoft Web
Browser component:
string URI = "http://some_address.org";
object flags = 0;
object targetframe = "";
object headers = "";
object post = "";
this.axWebBrowser1.Navigate(URI, ref flags,
ref targetframe, ref post, ref headers);

then i am able to create a IHTMLDocument, but i want to parse, modify and
the load it back

private void axWebBrowser1_DocumentComplete(object sender,
AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent e)
{
mshtml.IHTMLDocument2 HTMLDocument =
(IHTMLDocument2) axWebBrowser1.Document;
//i want to parse and modify HTMLDocument and load it back to
axWebBrowser1
}

didn't find anything on msdn about this

Any example on how to do it?

I also wrote a function that gets as input the URI and returns a string with
the HTML code of that page, then maybe i could load this string to the
axWebBrowser control, but how?

Would be very grateful for any kind of reply. Sorry for my English.
Nov 16 '05 #1
3 14054
> I also wrote a function that gets as input the URI and returns a string
with
the HTML code of that page, then maybe i could load this string to the
axWebBrowser control, but how?


there are a few possibilities, for example:

((mshtml.IHtmlDocument2)webBrowser.Document).write ( new_html_content );

regards,
Wiktor Zychla
Nov 16 '05 #2
thank you, it is working!
"Wiktor Zychla" <us**@nospam.com.eu> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
I also wrote a function that gets as input the URI and returns a string

with
the HTML code of that page, then maybe i could load this string to the
axWebBrowser control, but how?


there are a few possibilities, for example:

((mshtml.IHtmlDocument2)webBrowser.Document).write ( new_html_content );

regards,
Wiktor Zychla

Nov 16 '05 #3
>Any example on how to do it?

Check out Tim Anderson's work on how to use the HTML control for
editing, in C#:

http://www.itwriting.com/htmleditor/index.php

Marc
================================================== ==============
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
Nov 16 '05 #4

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

Similar topics

2
by: dxben | last post by:
I am considering a situation where I have (n) number of form windows, each with an instance of the Microsoft Web Browser Control (IE) on each form. In each web browser control is an HTML page that...
2
by: Rory Plaire | last post by:
Hi, I've been working with the J# browser control. I understand that v1.1b is scriptable, but can't find any examples on how to do this. Can someone point me in the right direction? thanks,...
3
by: Christopher D. Wiederspan | last post by:
I've got a WebBrowser control in a C# Windows form. I build HTML on the fly and then set it into the control using the DocumentText property of the control. All of this works fine, except that part...
9
by: hzgt9b | last post by:
I am using a web browser control to display some PPT slides saved as HTML. My client has recently asked that the background of the browser be changed to sonething other than white so that the...
2
by: Dave | last post by:
Hi, I'm creating a windows forms utility to create dhtml flyout menus. I want to load the html and javascript generated into a webbrowser control, thats on the form, so I can view the menus and...
0
by: duwayne | last post by:
I am writting a C# application that is basically a MDI application. Each MDI children contains an IE browser control. I need to be able to change the font size of the document in the browser, like...
1
by: Oenone | last post by:
I've reached the conversion of a part of my application from VB6 to VB.NET which uses the COM Web Browser control to display HTML content generated by my application. The general approach used...
4
by: Bootstrap Bill | last post by:
I have a Windows Form that uses the Microsoft WebBrowser control. If I load an HTML file into the control that contains Jscript code, can the Jscript code call a C# function in my Windows Form?
6
by: kimiraikkonen | last post by:
Hello, I have a listbox and folder browser control. I need to display all .mp3 files' pathes into listbox. It was Ok with openfiledialog but how can list all .mp3 extension- having files into...
1
by: klharding | last post by:
I am trying to load a web browser with a web site that contains an IP Address. I am able to load this website in an IE7 window with no issues on my Vista machine. But when I try to load this web...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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 ...

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.