Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

RichTextBox user control for ASP.NET 1.1

0.00/5 (No votes)
20 Sep 2007 2  
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