




























水印文本框在普通文本框中添加水印文字效果
当文本框为空的时候该控件可以使用自定义的CSS样式给用户显示某些信息。用户输入到文本框后不再显示水印文字。通常用于告诉用户文本框的一些信息而不用页面的其他地方。
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.
控件的属性
The control above is initialized with this code. The italic properties are optional:
<ajaxToolkit:TextBoxWatermarkExtender ID="TBWE2" runat="server"
TargetControlID="TextBox1"
WatermarkText="Type First Name Here"
WatermarkCssClass="watermarked" />
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。