AJAX – TextBoxWatermark


TextBoxWatermark is an ASP.NET AJAX extender that can be attached to an ASP.NET TextBox control to get “watermark” behavior. When a watermarked TextBox is empty, it displays a message to the user with a custom CSS style. Once the user has typed some text into the TextBox, the watermarked appearance goes away. The typical purpose of a watermark is to provide more information to the user about the TextBox itself without cluttering up the rest of the page.

TextBoxWatermark Properties

<ajaxToolkit:TextBoxWatermarkExtender ID=”TBWE2″ runat=”server”
TargetControlID=”TextBox1″
WatermarkText=”Type First Name Here”
WatermarkCssClass=”watermarked” />

  • TargetControlID – The ID of the TextBox to operate on
  • WatermarkText – The text to show when the control has no value
  • WatermarkCssClass – The CSS class to apply to the TextBox when it has no value (e.g. the watermark text is shown).
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s