Buy Questpond's video subscriptions on
huge discount
.
Online: 4018
Home
Articles
Interviews
Forums
For Beginners
Popular Questions
ITIL Career Advice
PMP Career Advice
Career Advices
Codes
Videos
ASP.NET
ASP.NET MVC
Android Intel XDK
Sql Server
AngularJS
Bootstrap
Backbone.JS
MongoDB
LESS (CSS)
jQuery
WPF
WWF
SSIS
LightSwitch
Tutorials
News
ASP.NET MVC
|
Be Interview Ready
|
Top Performers
|
DNF MVP
|
Top Posts
|
Winners
|
Subscribe
|
Catalogs
Welcome Guest !
Register
Login
Home
>
Forums
>
JavaScript
>
Loading ...
set formatted text to textarea
Posted by
Abhi_patil
under
JavaScript
on 2/21/2009 | Views : 5831 | Status :
[Member]
| Replies : 4
Write New Post
|
Search Forums
|
Resolved Posts
|
Un Answered Posts
|
Forums Home
i hv textarea with somemsg. suppose "this is my demo".
when i click on button,
i want the same msg with same color. but only "my" should be in RED color.
Reply
|
Reply with Attachment
Alert Moderator
Responses
Posted by:
Raja
on: 2/21/2009
[Member]
Starter
0
You can find the work and replace it with html code.
Like
string str = TextBox1.Text.Replace("my", "<font color=\"red\">my</font>");
Hope this will give you some idea.
Thanks
Regards,
Raja, USA
Abhi_patil
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Neeks
on: 2/22/2009
[Member]
Bronze
0
You cannot display HTML or formated tag in the TextArea.
Reason:
An html textarea tag will not render html.. it will only show text, so your html will not be rendered in the text area, it is not designed for that.
But,
You can formate the Label text using the Method provided by Raja.
Abhi_patil
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Abhi_patil
on: 2/26/2009
[Member]
Starter
0
i tried this but textbox contain this
"<font color=\"red\">my</font>"
as it is.
it doesnt come in red color.
Abhi_patil
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Neeks
on: 2/26/2009
[Member]
Bronze
0
Hi Abhi,
As I have already written that you cannot format the textarea. As it does not render the HTML control. You can provide the facility of Preview in a Label to the User.
Thanks,
Abhi_patil
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Login to post response
Latest Posts
How to get the exact property name while getting error
(0)
PDB file is not showing Line Number in dot net application hosted on server
(0)
Both Strings morethan 5 letters in length end of the words one vowel and one consonent is different
(0)
how to check Any adjacent letters transposed between two strings(ex: JOHN, JHON)
(1)
can't receive data after success login ?
(1)
Implement Multi-Tenant in Azure Logic Apps
(0)
Why ASP.Net Core 7.0 Web API showing as Connection refused?
(0)
Iterating over columns of dataframe and print as rows in Python Django
(0)
More ...