惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
博客园 - Franky
GbyAI
GbyAI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
博客园_首页
MongoDB | Blog
MongoDB | Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recent Announcements
Recent Announcements
Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
C
CERT Recently Published Vulnerability Notes
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Jina AI
Jina AI
F
Fortinet All Blogs
N
Netflix TechBlog - Medium
L
LangChain Blog
L
LINUX DO - 最新话题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Hacker News: Front Page
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
AI
AI
T
Troy Hunt's Blog
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
S
Secure Thoughts
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
S
Security @ Cisco Blogs
Cloudbric
Cloudbric
E
Exploit-DB.com RSS Feed
Attack and Defense Labs
Attack and Defense Labs

博客园 - 大厨师

DotNetNuke发布6.0版,开发语言改为C# 通过URL直接传递参数给报表服务中汉字的处理 重复文件整理 DotNetNuke 4/5 安装提示 msajax错误,下载AJAX 1.0即可解决 - 大厨师 siverlisht测试版上开发的应用程序因为和正式版兼容问题不能访问 Oracle数据库使用遇到问题记录 今天接到了微软公司最恶心的推销电话 还在为页面的兼容性苦恼? DotNetNuke模块开发简介 DotNetNuke 4.6.2 中文安装包及代码--重新做人 DotNetNuke 04.05.05 安装 卡巴司机能占多大地方? 微软推出中文版70-431,70-500考试 你能把百度搜成这样吗? 做技术的不如做广告的,还是做广告的侮辱做技术的? 关注MSDN图书中心,关注读书时代 Win2000 Win2003安装卡巴斯基6.0 微软再次发布正版验证更新 Ajax 学习,Accordion
Ajax 水印文本框
大厨师 · 2007-03-31 · via 博客园 - 大厨师

水印文本框在普通文本框中添加水印文字效果

当文本框为空的时候该控件可以使用自定义的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" />
  • TargetControlID - The ID of the TextBox to operate on 目标控件id
  • 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). 目标文本框为空时水印文字使用的CSS样式,如上图