RichTextBox

Add lightweight, WYSIWYG text editors to your ASP.NET pages.

asp:review

 

RichTextBox

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.

 

RichTextBox does have one significant limitation. Its support for editing formatted text is limited to Microsoft s Internet Explorer (IE) browser version 5.0 or later. If a visitor to your site is using any other browser, you have three options: display the document as read-only HTML, display it with an HTML TEXTAREA tag, or display a warning message. This limitation makes RichTextBox better suited for intranets instead of Internet sites. Another minor limitation is its use of JavaScript. RichTextBox typically generates hundreds of lines of HTML and JavaScript, so visitors must have JavaScript enabled on their browser to use the formatted text-editing features. Security-conscious visitors might be unable to use those features.

 

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].

 

asp:factfile

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.

 

RichTextBox.com

Rating:

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.

 

 

 

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish