469,345 Members | 6,212 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,345 developers. It's quick & easy.

Display HTML in Application Window

Bob
I am pretty new at C#, so bare with me. I want to be able to read a local HTML file and display it in a browser window within my application. I also want to submit that page to my application and generate a "Post" to a web server and read the contents back and display back into the same browser window in my application

I have found the methods HttpWebRequest and HttpWebResponse that allows me to read/write to the Web server, but I am not sure which Class or methods I should use to render the HTML in my application window, or to display the HTML response

I am sure its fairly basic. Does someone have a code sample or link where they can direct me

Thanks for the hel

Nov 16 '05 #1
3 1819
Add a refernce to MSHTML. That has a browser component, so you end up
hosting "IE".

Then you can point it wherever you want, or write directly to the document.
You can even listen on localhost on whatever port, and have the webbrowser
component communicate to your app through that, if you are so inclined.

-mike
MVP

"Bob" <an*******@discussions.microsoft.com> wrote in message
news:7A**********************************@microsof t.com...
I am pretty new at C#, so bare with me. I want to be able to read a local
HTML file and display it in a browser window within my application. I also
want to submit that page to my application and generate a "Post" to a web
server and read the contents back and display back into the same browser
window in my application.

I have found the methods HttpWebRequest and HttpWebResponse that allows me
to read/write to the Web server, but I am not sure which Class or methods
I should use to render the HTML in my application window, or to display
the HTML response.

I am sure its fairly basic. Does someone have a code sample or link where
they can direct me.

Thanks for the help


Nov 16 '05 #2
Bob
Mike,
Thanks for the start, but can you give me a little more information, specifically which component ? I added the reference and see all kinds for things in there when I expand the Object List for MSHTML, but not sure where to start or which control method to begin with
Thank for you help
Bob
Nov 16 '05 #3
It'll create an ActiveX wrapper:

AxSHDocVw.AxWebBrowser

-mike
MVP

"Bob" <an*******@discussions.microsoft.com> wrote in message
news:4C**********************************@microsof t.com...
Mike,
Thanks for the start, but can you give me a little more information,
specifically which component ? I added the reference and see all kinds
for things in there when I expand the Object List for MSHTML, but not sure
where to start or which control method to begin with.
Thank for you help.
Bob


Nov 16 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Bob | last post: by
2 posts views Thread by Patrick | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.