Looking for control that displays HTML

  • Thread starter Thread starter Ray Cassick \(Home\)
  • Start date Start date
R

Ray Cassick \(Home\)

I am looking for a control that displays simple HTML text (just basic tags,
not active content needed).

I know I can use the IE ActiveX control but really want to stay away from
the headaches if I can. There has to be some type of lite control out there
that can handle this. I am hacked off that the RTF control will not read
HTML. RTF tags are WAY too much work for what I need to do.


--
Raymond R Cassick
CEO / CSA
Enterprocity Inc.
www.enterprocity.com
3380 Sheridan Drive, #143
Amherst, NY 14227
V: 716-316-7537
Blog: http://spaces.msn.com/members/rcassick/
 
You mean that you just want to be able to render HTML without it being
parsed by the browser? If so, just wrap your output inside
Server.HTMLDecode(). For example:

Label1.Text = Server.HTMLDecode("<BODY>") will cause <BODY> to be rendered
(not parsed) by the client.
 
I have a windows forms control that I want to use to display some basic
formatted text to the user. I have an arraylist of classes that I want to
display the text of each class in a table style report.

I figured the very simple way would be iterate the arraylist, dereference
each class, get the data form each one, build a string that contains the
HTML for how I want the report to look and then send the string to a control
to have it rendered.

I currently have built a custom user control that does this, but it is
really messy and I think way more that I need. One simple light weight
control that could render some basic HTML would do the trick and I would not
have to worry about resizes etc..
 
Ray,

For that is the AXwebbrowser. Here a little sample how to use that, because
I have seen that in one of the steps something is often confusin. When you
do it like this than next time it is very easy.

Open a new windows application project

In the toolbox rightclick and select add/Remove items

In the customize toolbox select Com and in that Microsoft Webbrowser

When that is in the toolbox drag it to your form
Drag also a button to your form.

Then this code and you have a mini Webbrowser.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Me.AxWebBrowser1.Navigate2("www.google.com")
End Sub

I hope this helps a little bit?

Cor
 
Have you ever run into any project deployment issues doing this? I just hate
to have to worry about ActiveX control registration and stuff. This is why I
moved to DotNet in the first place :)

Can this be done using a string instead of a file reference?

I will have to look into it because although I put a lot of work into what I
have now I am just not happy with the results.
 
Back
Top