Click here to Skip to main content
15,867,750 members
Articles / Web Development / HTML
Article

RichTextBox user control for ASP.NET 1.1

Rate me:
Please Sign up or sign in to vote.
4.92/5 (11 votes)
20 Sep 20072 min read 107.3K   6.6K   36   25
RichTextBox user control for ASP.NET 1.1

Introduction

I just finished creating a RichTextbox control for my website.

So I thought it will be a great idea to put it on CodeProject so that it can be used for other developers who want such control and also I can get some good feedback to create better controls and improving the current one.

This is a simple control that lets you put in text and you can make the entered text Bold, Underline , Italics, Align the text, put a horizontal rule, give it desired font and size.

Also I have made the code such that you can get the text easily from the control using the getText() and getHTML() methods. The getText() method will give the inner text of the textbox and the getHTML() method will give the text with the HTML code embedded in the resulting text.

Checkout the code of the control where I have given a working example of using it.

Also the control is such designed that it will work perfectly on a Datagrid. Where in you can use it as a template item.

Any comments and/or suggestion are very much appreciated.

Using the code

Using the code is pretty simple and easy. Any web developer who has littele knowledge of working with user controls will be able to use it.

Although i have given a fully functional working example with it. You can view the example and learn how to use the control.

Screen Shots

Screenshot - ScreenShot1.jpg

working example in a stand alone page.

Screenshot - ScreenShot2.jpg

working example in a grid.

Conclusion

In case anyone wants to add some more functionalities to the code he / she is more than welcome to do so. Please give some feedback and observations as this is my first project that i have uplaoded. if you find certain ways that i can improve on, please let me know so.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
Generalsdsdada Pin
Member 328049127-May-15 11:27
Member 328049127-May-15 11:27 
QuestionNeed more funcition Pin
Dark_traveller10-Mar-13 22:10
Dark_traveller10-Mar-13 22:10 
GeneralMy vote of 4 Pin
mukesh_panth19-Dec-12 0:23
professionalmukesh_panth19-Dec-12 0:23 
QuestionRich text box with hyperlink attach to the text Pin
Member 779443228-Nov-12 16:44
Member 779443228-Nov-12 16:44 
GeneralMy vote of 5 Pin
sunnyuppal338-Feb-12 5:58
sunnyuppal338-Feb-12 5:58 
GeneralMy Vote of 5 too Pin
THE SK1-Feb-11 20:23
THE SK1-Feb-11 20:23 
GeneralMy vote of 5 Pin
shailendra_ec200330-Nov-10 19:24
shailendra_ec200330-Nov-10 19:24 
GeneralOnBlur event of Iframe is not working in Firefox Pin
Chandra.Anumakonda7-Dec-09 2:37
Chandra.Anumakonda7-Dec-09 2:37 
GeneralNeed help to set values in Richtextbox Pin
gopikrishnan.in2-Aug-09 7:28
gopikrishnan.in2-Aug-09 7:28 
GeneralRe: Need help to set values in Richtextbox Pin
gorkemdur16-Feb-11 23:00
gorkemdur16-Feb-11 23:00 
GeneralRich text Box Pin
chamieshani29-Apr-09 22:57
chamieshani29-Apr-09 22:57 
GeneralRichTextControl Pin
pwicks24-Mar-09 3:28
pwicks24-Mar-09 3:28 
GeneralNot seeing the methods Pin
jshiv12-Mar-09 7:50
jshiv12-Mar-09 7:50 
GeneralSetting Default Message Pin
Govind Gopal29-Dec-08 4:19
Govind Gopal29-Dec-08 4:19 
QuestionRTB with IE7 Pin
ToCentre25-Sep-08 22:58
ToCentre25-Sep-08 22:58 
GeneralNO GO Pin
Member 363694022-May-08 8:16
Member 363694022-May-08 8:16 
GeneralThanks. I find it usefull Pin
Abdul Bakour15-Apr-08 10:45
Abdul Bakour15-Apr-08 10:45 
Generalnot working in mozilla Pin
na_k2-Apr-08 0:42
na_k2-Apr-08 0:42 
GeneralRe: not working in mozilla Pin
na_k3-Apr-08 3:49
na_k3-Apr-08 3:49 
GeneralRe: not working in mozilla Pin
ankurgupta41428-Aug-09 1:33
ankurgupta41428-Aug-09 1:33 
GeneralSetting Default Message Pin
sujanakar6-Oct-07 1:28
sujanakar6-Oct-07 1:28 
GeneralRe: Setting Default Message Pin
jimmy.jiang26-Jun-08 22:44
jimmy.jiang26-Jun-08 22:44 
Generalnice work Pin
multimedia921-Sep-07 5:36
multimedia921-Sep-07 5:36 
GeneralRe: nice work Pin
Steve Maier21-Sep-07 7:24
professionalSteve Maier21-Sep-07 7:24 
GeneralRe: nice work Pin
s.kushal22-Sep-07 1:42
s.kushal22-Sep-07 1:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.