473,386 Members | 1,832 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.

WebBrowser control as an HTML document viewer?

I'm writing an application that will manage a database of documents typed
into the application by the user. Some documents will contain links to other
documents. If the user clicks on a link, the application will get the linked
document from the database and display it. The .NET 2.0 WebBrowser control
looks like a good candidate to display the documents (document entry will by
done by a form with text boxes).

Here are my questions:

(1) Is the WebBrowser a good candidate for this role? Are there better
Windows Form controls readily available?

(2) Are there any good examples out there of how to code the links? From
MSDN, the best approach seems to be to store the record ID of the linked
document in the URI property, then trap the Navigating event and get the ID
from the event args. Are there better approaches?

Thanks in advance.

David Veeneman
Foresight Systems
Jan 19 '07 #1
1 5798
David,

I think that the WebBrowser control is a fine candidate.

The solution you offer is a good suggestion. As long as you are
consistent in how you shape your urls which you will ultimately intercept,
you should be fine.

However, I would recommend creating your own scheme (you can do this by
having an asynchronous pluggable protocol handler) and then handling the
processing in there. It is cleaner, and you won't have to write a whole lot
of junk code in order to get the links to work properly. As long as you
generate the HTML correctly and the links correctly, your pluggable protocol
handler will do the heavy lifting of getting (and possibly generating) the
content.

Of course, it will require a great amount of interop of you do this in
..NET, but I think it is the cleaner solution.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"David Veeneman" <da****@nospam.comwrote in message
news:%2***************@TK2MSFTNGP06.phx.gbl...
I'm writing an application that will manage a database of documents typed
into the application by the user. Some documents will contain links to
other documents. If the user clicks on a link, the application will get
the linked document from the database and display it. The .NET 2.0
WebBrowser control looks like a good candidate to display the documents
(document entry will by done by a form with text boxes).

Here are my questions:

(1) Is the WebBrowser a good candidate for this role? Are there better
Windows Form controls readily available?

(2) Are there any good examples out there of how to code the links? From
MSDN, the best approach seems to be to store the record ID of the linked
document in the URI property, then trap the Navigating event and get the
ID from the event args. Are there better approaches?

Thanks in advance.

David Veeneman
Foresight Systems

Mar 29 '07 #2

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

Similar topics

0
by: Trevor Fairchild | last post by:
I'm trying to have VB6 write an html file during run-time, with some VBScript functionality. The intent is to display images based on the current record within the program - using a WebBrowser -...
5
by: Charles Law | last post by:
Sorry for the cross post, but I'm not sure who is best placed to answer this one. This is the most bizarre behaviour of MSHTML and streams. I have a WebBrowser control that contains nothing...
1
by: boxim | last post by:
Hi All, Just after some other opinions really.... We're writing this application that in places implements the WebBrowser control to make certain bits look nicer as well as make things quicker...
4
by: Toma Marinov | last post by:
Hello ! I made some test with webbrowser control in VS.2005. When I load a word document in webbrowser through .Navigate method (from my hdd), I want to get the stream of the loaded doc file with...
2
by: Spencer | last post by:
I am using the WebBrowser control in .NET 2.0 but it is throwing an error when trying to run a html page that has some JScript and an applet within it. The page runs fine via a standard IE 6.0...
12
by: Alex Clark | last post by:
Greetings, (.NET 2.0, WinXP Pro/Server 2003, IE6 with latest service packs). I've decided to take advantage of the layout characteristics of HTML documents to simplify my printing tasks, but...
8
by: Prosperz | last post by:
Hi, I would like to make thumbnails of web page by capture content of a WebBrowser. By example, capture http://www.google.com. I used WebBrowser control with Framework 2.0. I try this : ...
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: =?Utf-8?B?c25naWxi?= | last post by:
I am having 3 issues with the WebBrowser control which may all be related. The HTML for the page is the standard Weather Magnet from weather.com. The actual HTML is at the bottom of this page. ...
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: 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: 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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.