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 / VB.NET / October 2007

Tip: Looking for answers? Try searching our database.

Textbox text property with HTML facillities??

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Finn Stampe Mikkelsen - 27 Sep 2007 13:20 GMT
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
Patrice - 27 Sep 2007 14:16 GMT
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 ?

--
Patrice

> Hi
>
[quoted text clipped - 21 lines]
> Es gibt 10 arten von menschen. Die die binär verstehen bzw. die die es
> nicht tuhen
Finn Stampe Mikkelsen - 27 Sep 2007 15:36 GMT
> 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
[quoted text clipped - 22 lines]
>> Any way to do this without having to code a html-txt-html parse function
>> from scratch??

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
Patrice - 27 Sep 2007 15:54 GMT
> Hi patrice
>
[quoted text clipped - 3 lines]
> 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...

---
Patrice
Finn Stampe Mikkelsen - 28 Sep 2007 08:26 GMT
>> Hi patrice
>>
[quoted text clipped - 16 lines]
> 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
Patrice - 01 Oct 2007 15:17 GMT
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=

>>> Hi patrice
>>>
[quoted text clipped - 46 lines]
> Es gibt 10 arten von menschen. Die die binär verstehen bzw. die die es
> nicht tuhen
rowe_newsgroups - 27 Sep 2007 15:15 GMT
> Hi
>
[quoted text clipped - 21 lines]
> 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

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.