如何使用确认按钮? [英] How to use Confirm Button?
本文介绍了如何使用确认按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在ASP 2.0中使用确认按钮的代码吗?
I need the code to Use the Confirm Button in asp 2.0?
推荐答案
使用此ConfirmButtonExtebder :)
Use This ConfirmButtonExtebder :)
<itemtemplate>
<asp:linkbutton id="LinkButton1" runat="server" causesvalidation="False" commandname="Delete" xmlns:asp="#unknown">
Text="Delete"></asp:linkbutton><cc1:confirmbuttonextender id="LinkButton1_ConfirmButtonExtender" xmlns:cc1="#unknown">
runat="server" ConfirmText="Are you sure you want to delete?" Enabled="True"
TargetControlID="LinkButton1">
</cc1:confirmbuttonextender>
pre lang="c#"></itemtemplate>
e>
http://www.asp. net/ajaxLibrary/AjaxControlToolkitSampleSite/ConfirmButton/ConfirmButton.aspx [
使用Java脚本
Use Javascript
function checkConfirm() { if (confirm("are you sure")) alert("You pressed YES"); else { alert("You pressed NO"); return false } }
在按钮的onclicentclick
上调用上述函数.
如果单击否",代码将不会在后面的代码执行代码.
call above function ononclicentclick
of button.
if you click on NO, code will not execute code behind
这篇关于如何使用确认按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文