473,396 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 14052
> 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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.