473,386 Members | 1,799 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,386 software developers and data experts.

Viewing HTML Text String in Webbrowser Control without saving to a

I am attempting to view an HTML string in a hosted browser window (vb.net 03
+ ie6sp2)

I have something like this

dim strHTML as String = "<HTML>TEST</HTML>"

What I want to do is show that text in the control without having to save it
to a temp file first.

What I would like to do is something like:
AxWebBrowser1.Document.HTML = strHTML

thanks -Shadowboxer
Nov 21 '05 #1
5 8056
This won't answer your question, but there isn't service pack 2 out for
Internet Explorer 6.

Default IE Page:

http://www.microsoft.com/windows/ie/default.mspx

"shadowboxer" wrote:
I am attempting to view an HTML string in a hosted browser window (vb.net 03
+ ie6sp2)

I have something like this

dim strHTML as String = "<HTML>TEST</HTML>"

What I want to do is show that text in the control without having to save it
to a temp file first.

What I would like to do is something like:
AxWebBrowser1.Document.HTML = strHTML

thanks -Shadowboxer

Nov 21 '05 #2
Shadowboxer.

Have a look for TabName.Innertext and than for HTML, however I never did
this but that is what is the text between two tags. (And than with mshtml)

http://msdn.microsoft.com/library/de.../innertext.asp

I hope this helps anyway

cor
Nov 21 '05 #3
"shadowboxer" <sh*********@discussions.microsoft.com> schrieb:
I have something like this

dim strHTML as String = "<HTML>TEST</HTML>"

What I want to do is show that text in the control without having to save
it
to a temp file first.


You can navigate to an "empty" dummy document and set
'Document.innerHTML' to the string containing the HTML code.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #4
In fact, it doesn't even need to be a 'document'. Navigate to "about:blank"
for the same effect. In any case, this is correct initialisation procedure
for the control. Be sure to wait for readyState to return "complete" before
you continue.

HTH

Charles
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:O0**************@TK2MSFTNGP12.phx.gbl...
"shadowboxer" <sh*********@discussions.microsoft.com> schrieb:
I have something like this

dim strHTML as String = "<HTML>TEST</HTML>"

What I want to do is show that text in the control without having to save
it
to a temp file first.


You can navigate to an "empty" dummy document and set
'Document.innerHTML' to the string containing the HTML code.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #5
You can also try

dim strHTML as String = "<HTML>TEST</HTML>"
dim strDoc as String = "javascript:document.write(" & strHTML & ")"
Me.myAxWebBrowser.Navigate(strDoc)
Atara.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 21 '05 #6

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

Similar topics

3
by: Adam Kenney | last post by:
Is there a control for Windows Forms that will display HTML (from either a variable or a stored file) as it would appear in a browser window? I'm trying to create a Windows Form that includes a...
6
by: Vijay | last post by:
I need to generate HTML files based on the some codes. One HTML file per code. I have the link (ex:http://123.234.345.456/WebPages/GetTestData.aspx?SomeCode=25), by passing the code as parameter I...
5
by: Tomaz Koritnik | last post by:
Hi I have many short HTML files stored in a binary stream storage to display descriptions for various items in application. HTML would be display inside application using some .NET control or...
5
by: IkBenHet | last post by:
Hello, I use this script to upload image files to a folder on a IIS6 server: ******************* START UPLOAD.ASPX FILE ********************** <%@ Page Language="VB" Debug="true" %>
4
by: eewwttww | last post by:
how to save with only WebBrowser: save html+picture without dialog box? what I Have is: WebBrowser.ExecWB OLECMDID_SAVEAS, OLECMDEXECOPT_PROMPTUSER, 300, 300 I don't want this code. I want...
5
by: Jesper | last post by:
Hi, Is there an alternative to an URI location when loading html into a webBrowser control. I have some html generated in a string. I would like to skip saving the string to a file on disk...
4
by: Steve Richter | last post by:
I would like to build an HTML stream as a string and have the WebBrowser control render that HTML. Then on PostBack, or whatever it is called, I would like my code to be the one that receives what...
0
by: lazycoder207 | last post by:
hi i have a webbrowser control and textbox control in a form ..when application is starting up, webbrowser loads a page on my drive..that page links to a css style sheet..which has p {...
2
by: Artie | last post by:
Hi, I've searched the web but can't find a solution to an apparently really simple problem. My app contains an HTML string and I need to be able to invoke the Print Dialog to print the HTML...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...

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.