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

推荐订阅源

月光博客
月光博客
C
Check Point Blog
J
Java Code Geeks
腾讯CDC
Apple Machine Learning Research
Apple Machine Learning Research
宝玉的分享
宝玉的分享
Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学
量子位
Google DeepMind News
Google DeepMind News
I
InfoQ
The GitHub Blog
The GitHub Blog
aimingoo的专栏
aimingoo的专栏
N
Netflix TechBlog - Medium
Hugging Face - Blog
Hugging Face - Blog
博客园 - Franky
V
V2EX
Blog — PlanetScale
Blog — PlanetScale
T
The Blog of Author Tim Ferriss
小众软件
小众软件
博客园_首页
人人都是产品经理
人人都是产品经理
博客园 - 聂微东
IT之家
IT之家

博客园 - Skycper

My new blog Nokia Connecting Pop Win Vista Beta2 软件使用手记 ASP.NET中Dangerous Request.Form value错误的解决方法 Google's two new productions 五一回家了 MAC OS X for x86、Windows Vista、Windows XP三系统安装及试用手记 javascript实现类似google拖动效果 - Skycper - 博客园 利用xmlhttp实现页面无刷新数据更新技术 - Skycper - 博客园 Google Page Creator II 鬼舞者3(Onimusha 3) Goolge Page Creator foxmail国外邮箱的使用方法 取消WinXP磁盘容量警告的方法 Web建设中... asp.net...xml...sqlserver...努力努力... 电话线搞怪... 后悔了?没后悔?后悔了?Who knows... 世事难料
页面上弹出确认删除对话框
Skycper · 2006-02-13 · via 博客园 - Skycper

Button1.Attributes.Add("onclick","return window.confirm('将要删除此记录,确定吗?');");

在一个Datagrid里面有删除按钮的一列,当点击删除按钮的时候弹出是否删除的按钮.
Datagrid的ItemDataBound事件中

Button btn = (Button)e.Items.Cell[0].Control[0]; 摸板列
btn.Attributes.Add("onclick","return confirm('您真的要删除吗?');"); 

Button btn = (Button)e.Items.FindControl("btn"); 自定义按钮列
btn.Attributes.Add("onclick","return confirm('您真的