All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
LINQ体验(6)——LINQ,to,SQL语句之Join和Order,By_[Asp.Net教程]
SQL循序渐进(2)-------表的基础知识_[SQL,Server教程]
在使用ASP.NET网站管理工具出现“遇到错误。请返回上一页并重试。”的解决办法!_[Asp.Net教程]
c#中GDI+图形图像:GDI+中的图形路径使用方法
XML,WebService完全实例详细解析_.net资料_编程技术
ASP.NET,2.0中CSS失效的问题总结_[Asp.Net教程]
PHP日常开发小技巧_[PHP教程]
Asp.net中的页面乱码的问题_[Asp.Net教程]
asp.net初学者项目开发疑难小结_[Asp.Net教程]
PHP编写网站程序的十个经验技巧_php资料_编程技术
Reading number is top 10 pictures
邪恶搞笑内涵图
Green sweet joey wong young old photos exposure
代沟,真好
A man's favorite things8
From China fortress sora aoi4
Is said to be a Chinese female artist fame explicit pictures before1
泳装名模阿尔贝特妮写真2
Wear bikinis cock
Go to the national museum2
Fierce! China's special forces training the devil1
Download software ranking
Boxer vs Yellow4
linux高级编程
功夫熊猫2(下集)
传奇私服架设教程
Unix video tutorial12
Kung fu panda - the secret of the teacher
Unix video tutorial20
Tram sex maniac 2 (H) rar bag9
Detective task-the top secret prostitution files
Unix video tutorial8
aaa published in(发表于) 2013/12/17 7:47:08 Edit(编辑)
在ASP.NET中为GridView添加删除提示框_.net资料_编程技术

在ASP.NET中为GridView添加删除提示框_.net资料_编程技术

在ASP.NET中为GridView添加删除提示框_.net资料_编程技术-你的首页-uuhomepage.com

  在GridView中我们可以直接添加一个CommandField删除列来删除某行信息。但为了避免误操作引起的误删除,在删除操作者让操作者再确认下,完后再进行删除。


  首先我们给我们的GridView 添加一个模板列,如下:


<ASP:TemplateField HeaderText="Delete" ShowHeader="False">
<ItemStyle ForeColor="Red" />
<ItemTemplate>
 <asp:LinkButton ID="BtnDelete" runat="server" CausesValidation="False" CommandName="Delete"
Text="Delete"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>


  其次我们给我们所添加的模板列添加:OnClientClick="return confirm('确认要删除此行信息吗?')" ,如下:


<asp:TemplateField HeaderText="Delete" ShowHeader="False">
<ItemStyle ForeColor="Red" />
<ItemTemplate>
 <asp:LinkButton ID="BtnDelete" runat="server" CausesValidation="False" CommandName="Delete"
Text="Delete" OnClientClick="return confirm('确认要删除此行信息吗?')"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>


  点击删除时就会先在客户端弹出“确认要删除吗?”对话框,一般我们确认删除。





添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.