Add lightweight, WYSIWYG text editors to your ASP.NET pages.
By Glenn E. Mitchell II
If visitors to your Web site are familiar with any of the Microsoft Office applications, the user interface to RichTextBox will provide a familiar experience. Visitors to your site can bold text entries, add underlines, and select fonts, font sizes, and font colors (see Figure 1). They can select HTML paragraph styles or even use named styles from your Cascading Style Sheets (CSS). RichTextBox is 100 percent ASP.NET no plug-ins, Java, or client-side downloads and you can customize it easily. Also, you can export entries as plain text or well formed XHTML.
Figure 1. The RichTextBox control lets users add numerous word processor like attributes to their text box content.
Adding RichTextBox to pages is straightforward: Drag a RichTextBox icon from your Visual Studio .NET toolbox, drop it on an open ASP.NET page, and configure its property sheets. The control renders at design time, so there s no guessing what the user will experience. When you work with RichTextBox in the code editor, you get full support for IntelliSense statement completion. You can subclass RichTextBox, too, adding custom features, and you can work entirely in code if that s your preference.
I encountered no problems installing or using the control. The documentation has a look and feel familiar to anyone working with Visual Studio .NET, and there s a single compiled help file.
The one feature I did not like about RichTextBox is not apparent until a user clicks on their browser s Back button. When this happens, the contents of the RichTextBox control are lost unless you take some precautions in your code. You need to save the contents of the control each time the page is submitted, then reload that data if the page is reloaded. Why all this extra coding? Although RichTextBox behaves a lot like a normal form control, it is not really a normal form control. RichTextBox uses an iframe tag, which imposes some limits.
The recently released upgrade, version 1.5, adds some interesting new features such as emoticons, tables, support for ASP.NET validation controls, and the ability to create your own custom menus and buttons.
RichTextBox comes in two versions: RichTextBox Professional is tailored for Web sites running across multiple servers and for servers hosting more than one site; RichTextBox Standard is tailored specifically for smaller Web sites. Free 30-day evaluations are available.
Glenn Mitchell is president of .Com Consulting Group, a consulting firm in Tallahassee, Fla., specializing in Microsoft enterprise solutions. In addition to consulting, he lectures and writes about enterprise application development for Microsoft-sponsored conferences and journals. E-mail him at mailto:[email protected].
RichTextBox is an easy-to-use, lightweight server control for ASP.NET that allows you to implement an in-page editor on your Web site without using plug-ins or Java.
Web Site: http://www.RichTextBox.com
Price: US$89.95 (Standard), $249.95 (Professional)
Tell us what you think! Please send any comments about this article to [email protected]. Please include the article title and author.