Gridview中的警报窗口 [英] Alert Window in Gridview

查看:77
本文介绍了Gridview中的警报窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在删除GridView中的记录时显示警报,如果用户单击确定",则只需要删除该记录.

I want to display an alert while deleting a record in GridView if the user clicks ok then only the record has to be deleted.

有人可以帮我解决这个问题吗?

Can someone please help me out regarding this issue?

推荐答案

您可以在GridView的RowDataBound Event中进行操作.您需要在其中找到控件的地方,为该按钮/链接添加JavaScript onlick.

如果您需要进一步的澄清,请告诉我.

You can simply do it in RowDataBound Event of GridView. where you need to find control add the JavaScript onlick for that button/link.

Let me know if you need any further clarrification.


function ConfirmDelete()<br />{<br />return confirm(''Do you want to delete?'';<br />}<br />



此处为删除按钮的onclick属性.



at this to onclick attribute of the delete button.


这篇关于Gridview中的警报窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆