Watermark extender and CSS

How to use the watermark extender on a styled textbox/textarea with CSS?

Just add the CSS onto the watermark extender WatermarkCssClass property along with the watermark CSS.

<style type="text/css">
.someStyle
{
	border:0px;
	height:40px;width:370px;
	padding-left:10px;padding-right:10px;
}
input.watermark
{
	color: #999;
}
</style>

<ajaxToolkit:TextBoxWatermarkExtender ID="we"
	TargetControlID="txt" WatermarkCssClass="someStyle watermark"
	runat="server" WatermarkText="Write here..." />

<asp:TextBox ID="txt" runat="server" CssClass="someStyle" />

 

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