Putting text into a WebBrowser
I'm working on an app that uses a database. I've been using a RichTextBox to show the data from a ListView_Click and when you click on the url it shows the page in the WebBrowser, that works perfectly. What I need is to display all this data in a WebBrowser. The format is HTML I would think. Would it be possible to click on the url and goto that site?
e.g.
<b>Name:</b>John Davis<br>
<b>URL:</b>www.hisurl.com
etc
The only suitable property in the WebBrowser is Navigate. I've tried posting the text into a temp.url and loading it from there but that doesn't work. I've tried WebBrowser.Print Text1.Text but that doesn't work either. As normal with additional controls there's no help.
Do anyone have any idea how you show text on a WebBrowser?
Re: Putting text into a WebBrowser
Heres a link to some of my code examples on automating and parsing data from a web page.
http://www.vbforums.com/showthread.php?t=330341
Re: Putting text into a WebBrowser
Thanks RobDog. I did a search before posting and nothing came up that was relavant. There are plenty of topics how to receive data from a WebBrowser, link your link but none I could find about putting text into a WebBrowser. ;)
Re: Putting text into a WebBrowser
Is this webbrowser the webbrowser control or just the regular IE or FF?
Re: Putting text into a WebBrowser
Sorry its Microsoft Internet Control, Shdocvw.dll.
Re: Putting text into a WebBrowser
So it is a web browser on your form. The link I posted is exactly what you need then. You can enter, submit, read webpages with it.
Re: Putting text into a WebBrowser
Sorry RobDog there's nothing on that link that will suggest adding text to a WebBrowser. It only shows you how to link a url to a WebBrowser, which I already know.
All I want to do is show this in a WebBrowser, but how. ;)
<b>Name:</b>John Davis<br>
<b>URL:</b>www.hisurl.com
Re: Putting text into a WebBrowser
So its not going to be from the web but just text you want to display?
Re: Putting text into a WebBrowser
IE.Navigate "about:blank"
in the doc complete event...
IE.Document.Write "<b>Name:</b>John Davis<br><b>URL:</b>www.hisurl.com"
Re: Putting text into a WebBrowser
Quote:
Originally Posted by Keithuk
What I need is to display all this data in a WebBrowser. The format is HTML I would think.
e.g.
<b>Name:</b>John Davis<br>
<b>URL:</b>
www.hisurl.com
Quote:
Originally Posted by RobDog888
So its not going to be from the web but just text you want to display?
Correct.
Quote:
Originally Posted by [A51g]Static
IE.Navigate "about:blank"
in the doc complete event...
IE.Document.Write "<b>Name:</b>John Davis<br><b>URL:</b>www.hisurl.com"
So I will need a Reference to Internet Explorer with this code '[A51g]Static'