服务器端混淆消息

编程入门 行业动态 更新时间:2024-10-25 22:34:33
本文介绍了服务器端混淆消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

如何在asp中的服务器端代码中显示确认消息

how to show the confirmation message in sever side code in asp

推荐答案

服务器端-代码隐藏-是 - 否 - 认可 - 消息箱中-ASPNet.aspx [ ^ ] http:/ /forums.asp/t/1904944.aspx [ ^ ]

以下代码段可以帮助您: The below snippet may help you: <asp:button id="Button1" text="Delete" onclick="CallDeleteFunction" onclientclick="return ConfirmOnDelete();" xmlns:asp="#unknown" /> <input id="hidden_Value" type="hidden" runat="server" />

<script type="text/javascript"> function ConfirmOnDelete() { var ret=confirm('Do you want to delete the item?'); if (ret==true) { document.getElementById('hidden_Value').value="OK"; } else { document.getElementById('hidden_Value').value="Cancel"; } } </script>

代码落后:

Code behind:

public void CallDeleteFunction(object sender, Eventargs e) { string hiddenVar=hidden_Value.Value; if(hiddenVar=="OK") { Call some delete operation.... } else { Do nothing.... } }

希望它有所帮助。 -Anurag

Hope it helps. -Anurag

更多推荐

服务器端混淆消息

本文发布于:2023-11-13 01:38:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1583055.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:服务器端   消息

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!