在aspx.cs页面中使用确认框 [英] use confirm Box in aspx.cs page
本文介绍了在aspx.cs页面中使用确认框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在按钮上单击,我从数据库中获得了一些链接,然后在其中显示了确认框..
On button click i have some linking from database and after that show confirm box..
推荐答案
尝试使用它,
Hi,
Try Using This,
<asp:imagebutton id="imgDelete" cssclass="gridIcon" runat="server" imageurl="~/Images/delete.gif" ommandname="Delete" tooltip="Delete" onclientclick="return confirm('Are you sure that you want to delete this record?');"> </asp:imagebutton>
希望这对您有帮助.
Hope This May Help You..
您可以为此使用javascript或jquery ajax.
jQuery ajax如下所示
Hi,
you can use javascript or jquery ajax for that.
jquery ajax as follows
.get("Example.aspx?parameter1=1¶meter=2¶meter3=3, function(response) { if(response!=null) { alert("Give yor msg here..."); confirm("msg"); } });
.get("Example.aspx?parameter1=1¶meter=2¶meter3=3, function(response) { if(response!=null) { alert("Give yor msg here..."); confirm("msg"); } });
页面加载中Example.aspx.cs页面中的代码
coding in Example.aspx.cs page in page load
Response.Expires = -1;
//required to keep the page from being cached on the client''s browser
string retResponse = String.Empty;
string str= Request["parameter1"].ToString();
string str1= Request["parameter2"].ToString();
retResponse = functionName(str, str1);
Response.ContentType = "text/plain";
Response.Write(retResponse);
Response.End();
这篇关于在aspx.cs页面中使用确认框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文