I defined a textbox named txtMsg to hold the body part of the message.
What I want to do is to display html content in txtMsg like this:
txtMsg.text="<b>Hi xxx,</b><br /> blah blah blah"; (where Hi xxx should be in bold and with a line break)
The TextBox display it in plain text instead of rendering it as html.
If i do this to a Label control, it works fine. Is it possible to do this with TextBox? If i can not accomplish what i am doing using textbox, what other
tigernt
Member
46 Points
21 Posts
Display html in a textbox
May 15, 2008 07:33 PM|LINK
Hi,
I have a simple webmail page.
I defined a textbox named txtMsg to hold the body part of the message.
What I want to do is to display html content in txtMsg like this:
txtMsg.text="<b>Hi xxx,</b><br /> blah blah blah"; (where Hi xxx should be in bold and with a line break)
The TextBox display it in plain text instead of rendering it as html.
If i do this to a Label control, it works fine. Is it possible to do this with TextBox? If i can not accomplish what i am doing using textbox, what other
controls can recognize html tags
Thanks!
Text box text webmail mail html
Curt_C
All-Star
66014 Points
7639 Posts
Moderator
Re: Display html in a textbox
May 15, 2008 07:44 PM|LINK
you'll have to use whats called a "Rich" textbox.
FreeTextBox
TinyMCE
FCKEditor
RichTextBox
These are all ones that are out there, in addition to others....
v5.1 of iTracker (Inventory Tracker Starter Kit) is out, Download it now!
jpuckett
Contributor
5802 Points
1036 Posts
Re: Display html in a textbox
May 15, 2008 07:45 PM|LINK
www.freetextbox.com
vinz
All-Star
126896 Points
17922 Posts
MVP
Re: Display html in a textbox
May 15, 2008 07:49 PM|LINK
You can use Literal control...
Literal1.Text="<b>Hi xxx,</b><br /> blah blah blah";
MessageBox Controls for WebForms | Blog | Twitter | Linkedin
patron
Member
200 Points
143 Posts
Re: Display html in a textbox
Jul 26, 2008 04:09 AM|LINK
I saw the richtext editor on vb.net.
Is there any chance I can use that components on my asp.net pages?
Animator7
Member
4 Points
2 Posts
Re: Display html in a textbox
Jul 26, 2008 05:31 AM|LINK
http://cutesoft.net/ASP.NET+WYSIWYG+Editor/Rich-Text-Editor.aspx?gclid=CPWVu-Dm3JQCFQntegodOmztSw
http://www.daniweb.com/forums/thread6498.html
google with "rich text box" + "asp.net" and you get a lot of results.
http://discussionsuntileot.blogspot.com/
patron
Member
200 Points
143 Posts
Re: Display html in a textbox
Jul 26, 2008 03:05 PM|LINK
that is not what I was asking. But thanks for trying.
Curt_C
All-Star
66014 Points
7639 Posts
Moderator
Re: Display html in a textbox
Jul 28, 2008 12:17 PM|LINK
did you mean the one in the WINDOWS form designer? If so...no.... it wont work in a Web environment.
v5.1 of iTracker (Inventory Tracker Starter Kit) is out, Download it now!