Textbox text property with HTML facillities??

  • Thread starter Finn Stampe Mikkelsen
  • Start date
F

Finn Stampe Mikkelsen

Hi

Is there any way to make the textbox property show html, like a textarea on
a webpage would??

I have a webapplication that saves an textarea complete with html tags and
everything...

Now i'm coding a windows application to work with the same data and i need
these data to be displayed on an windows form, like they would on the
webform...

After data manipulation, i would need to return the data to the database in
the same html format as it was originally...

Any way to do this without having to code a html-txt-html parse function
from scratch??

/Finn
--
Der er 10 slags mennesker - Dem som forstår binær og dem som ikke gør.
There are 10 kinds of people. Those who understand binary ant those who
don't.
Es gibt 10 arten von menschen. Die die binär verstehen bzw. die die es nicht
tuhen
 
P

Patrice

Not sure what you are looking for. A textarea shows the html markup as a
winforms textbox should do. What happens when you display your HTML markup
inside a textbox. Do you mean you don't see any more your HTML tags ?

Or do you mean you want the HTML to be rendered ?
 
R

rowe_newsgroups

Hi

Is there any way to make the textbox property show html, like a textarea on
a webpage would??

I have a webapplication that saves an textarea complete with html tags and
everything...

Now i'm coding a windows application to work with the same data and i need
these data to be displayed on an windows form, like they would on the
webform...

After data manipulation, i would need to return the data to the database in
the same html format as it was originally...

Any way to do this without having to code a html-txt-html parse function
from scratch??

/Finn
--
Der er 10 slags mennesker - Dem som forstår binær og dem som ikke gør.
There are 10 kinds of people. Those who understand binary ant those who
don't.
Es gibt 10 arten von menschen. Die die binär verstehen bzw. die die es nicht
tuhen

The only Windows control I know of for displaying HTML is the
WebBrowser control.

Thanks,

Seth Rowe
 
F

Finn Stampe Mikkelsen

Patrice said:
Not sure what you are looking for. A textarea shows the html markup as a
winforms textbox should do. What happens when you display your HTML markup
inside a textbox. Do you mean you don't see any more your HTML tags ?

Or do you mean you want the HTML to be rendered ?

Hi patrice

I would like to have the HTML code rendered to be shown in the textbox as it
does on the rendered webpage. After editing, i want to rewrite the text to
the database as html formatted text, to be rendered on a webpage at a later
date as if everything had never been around an windows application and its
textbox

/Finn
--
Der er 10 slags mennesker - Dem som forstår binær og dem som ikke gør.
There are 10 kinds of people. Those who understand binary ant those who
don't.
Es gibt 10 arten von menschen. Die die binär verstehen bzw. die die es nicht
tuhen
 
P

Patrice

Hi patrice

I would like to have the HTML code rendered to be shown in the textbox as
it does on the rendered webpage. After editing, i want to rewrite the text
to the database as html formatted text, to be rendered on a webpage at a
later date as if everything had never been around an windows application
and its textbox

Ok was confused as you talked about textarea that AFAIK is not rendering
HTML but just displays the raw HTML.

You could use the webbrowser control to render HTML. I'm not sure which
level of editing capabilities you would like to provide to your users (how
won't they destroy possibly things when editing). So you would even need an
HTML editing control depending on how compelx is the HTML code you are
supposed to show them. AFAIK this can be done with IE that provides an
editing mode (not sure if compatible with other browsers), or third party
controls. I believe that latests Rich textbox controls allows also to handle
HTML editing out of the box but this is perhaps those coming with WPF...
 
F

Finn Stampe Mikkelsen

Patrice said:
Ok was confused as you talked about textarea that AFAIK is not rendering
HTML but just displays the raw HTML.

You could use the webbrowser control to render HTML. I'm not sure which
level of editing capabilities you would like to provide to your users (how
won't they destroy possibly things when editing). So you would even need
an HTML editing control depending on how compelx is the HTML code you are
supposed to show them. AFAIK this can be done with IE that provides an
editing mode (not sure if compatible with other browsers), or third party
controls. I believe that latests Rich textbox controls allows also to
handle HTML editing out of the box but this is perhaps those coming with
WPF...

Hi Patrice

I will have a look at the WebBrowser contro and see if it can solve my
problem...

Excactly what i need is this....

I have the following in my database as a cell :

Vedhæftet fil<BR><BR><B>Trin der allrede er
fuldført:</B><BR>Uploaded<BR><BR><B>Valgte produkter:</B>&nbsp;&nbsp;-

This data is put there by a webpage working with this data. It is however
shown on the page in a textbox-like area rendered like it was regular html.
After that box has been edited, the text is rewritten to the database in the
same format...

Now, i have tried the WebBrowser control and it can display the text okay,
but i cannot edit the text in the window. Also i would need to return the
webbrowser.document to the state above, in order to return the data to the
database...

/Finn
--
Der er 10 slags mennesker - Dem som forstår binær og dem som ikke gør.
There are 10 kinds of people. Those who understand binary ant those who
don't.
Es gibt 10 arten von menschen. Die die binär verstehen bzw. die die es nicht
tuhen
 
P

Patrice

I'm not sure what it means (this could perhaps help ?), actually I'm even
sure to not understand ;-)

For now I'm not sure which strategy you are trying to implement. I see
basically 3 options :
- editing the text "as if". This is simple but the user is exposed to html
tags he might not known about
- editing only the text. Then how to know which text should go back were ?
It would be much easier if the parts were edited separately and the overall
HTML would be constructed later from these pieces. The user would never be
exposed to HTML but can't also change the style of a particular word
- editing the rendered content as a whole but without the user having to
know about HTML and in this case you need an HTML editing control (possbly
third party) so that the user can change the text but also decide to use
bold on one word or another with a UI wihtout having to know about HTML
etc...

I belive you are after topnio 3 in whihc case you could try :
http://www.google.com/search?hl=fr&q=html+editing+control&meta=
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top