TextBox WaterMark Extender

This control is used to provide watermark for the textbox Indicating what value to input in the textbox without using a label to provide a caption for the textbox properties.


TargetControlID :

WatermarkText : Used to specify what is the text to display in textbox as watermark.

Watermarkcssclass: Used to specify the cssclass to use to display the watermark.


The following example demonstrates how to use Textbox water mark extender.

Add a page to the website and then take a Toolkitscriptmanager & two textboxes on the page and set ID’s of Textboxes as T1 & T2.

Within HTML source of the page within the head section create a css class with the name watermark as follows.

<style type=”text/css”>



font-family : ArialBlack;

font-size: large;

color: Gray;



Within HTML Source itself drag & drop two textbox watermark extenders and set following properties for that

<asp: TextBoxWatermarkExtender ID=”TextBoxWaterMarkExtender” runat=”server” TargetcontrolID=”T1” watermarkText=”userID” watermarkcssclass=”watermark”></asp:Textboxwatermarkextender>

<asp:TextBoxWatermarkExtender Id=”TextBoxWaterMarkExtender 2” runat=”server” TargetcontrolID=”T2” watermarkText=”password” watermarkcssclass=”watermark”>  </asp:TextBoxWatermarkExtender>