Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / August 2006

Tip: Looking for answers? Try searching our database.

Load HTML in WebBr from string

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jesper - 30 Aug 2006 09:31 GMT
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 and then loading it from disk into webbrowser with
its Navigate() method. Is there a direct (string -> browser) method instead?.

Thanks.
Jesper, DK.
Cor Ligthert [MVP] - 30 Aug 2006 11:33 GMT
Jesper,

You make me curious what are you doing.

wb.Navigate(http://windowssdk.msdn.microsoft.com/en-us/library/40x214wa.aspx);

This should be enough to show the page with the information about that.

I hope this helps,

Cor

> Hi,
>
[quoted text clipped - 9 lines]
> Thanks.
> Jesper, DK.
Jesper - 30 Aug 2006 12:05 GMT
No, that didn't help.

Im building data output in html format like this

string src = "<html>.......</html>"

webBrowser.Load(src).

... but no such functionality seems to exist. I have to save the string
first to disk and then load it into the browser using navigate... And I dont
want disk operations involved.

Any tips on how to avoid disk operations?

regards Jesper

> Jesper,
>
[quoted text clipped - 21 lines]
> > Thanks.
> > Jesper, DK.
Cor Ligthert [MVP] - 30 Aug 2006 12:14 GMT
Jesper,

That functionality exist in the 2.0 webbrowser, I assume you talking about
that, because the old one has the name AxWebbrowser.

documenttext
http://msdn2.microsoft.com/en-us/library/system.windows.forms.webbrowser.documen
ttext.aspx


I hope this helps,

Cor

> No, that didn't help.
>
[quoted text clipped - 38 lines]
>> > Thanks.
>> > Jesper, DK.
erman.olca@gmail.com - 30 Aug 2006 13:53 GMT
Hi,

You can use webbrowser.documentText property to assign the html content
to webbrowser document. Also you can use streaming to load html.

Best Regards
erman.olca@gmail.com - 30 Aug 2006 13:53 GMT
Hi,

You can use webbrowser.documentText property to assign the html content
to webbrowser document. Also you can use streaming to load html.

Best Regards,
Erman OLCA

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.