I want to format lines of text differently in a .net C# webforms text box, eg. some lines italic or different colour? I know I can in windows forms, is there a richtextbox alternative for webforms? I find a lot of people asking but no answer...please can you help?
A:
You can have the following properties
can set these inside your style tag
color: #ffffed
gives the text text inside a color
font-style: italic
will make the font in italics
<style>
.styledText { color: #ffeded; font-style: italic; }
</style>
<input type="text" id="txt1" class="styledText" />
If you are using an asp.net textbox then you can use the cssclass property instead of the class property.
rahul
2009-08-10 11:20:02