这个asp.net服务器端的确认框,真的能确保数据安全无误吗?

2026-03-30 12:531阅读0评论SEO资源
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计254个文字,预计阅读时间需要2分钟。

这个asp.net服务器端的确认框,真的能确保数据安全无误吗?

我想在asp.net中从服务器端显示确认框:我想从服务器端调用它,因为我必须从服务器端获取客户消息。我使用了以下代码:string str=Are you sure, you want to Approve this Record?;ClientScript.RegisterClientScriptBlock(...);

我想从服务器端在asp.net中显示确认框:

我想从服务器端调用它,因为我必须从服务器端获取客户消息.我使用以下代码

string str = "Are you sure, you want to Approve this Record?"; ClientScript.RegisterStartupScript(typeof(Page), "Popup", "return confirm('" + str + "');",true); // More code ....

现在它显示弹出窗口,无论我点击什么,无论是“确定”还是“取消”,我的代码都在执行.

如果用户在确认框中选择“取消”,请告诉我如何限制执行代码.

看看这个:

代码背后:

string str = "Are you sure, you want to Approve this Record?"; this.ClientScript.RegisterStartupScript(typeof(Page), "Popup", "ConfirmApproval('" + str + "');", true);

ASPX:

function ConfirmApproval(objMsg) { if(confirm(objMsg)) { alert("execute code."); return true; } else return false; }

这个asp.net服务器端的确认框,真的能确保数据安全无误吗?

本文共计254个文字,预计阅读时间需要2分钟。

这个asp.net服务器端的确认框,真的能确保数据安全无误吗?

我想在asp.net中从服务器端显示确认框:我想从服务器端调用它,因为我必须从服务器端获取客户消息。我使用了以下代码:string str=Are you sure, you want to Approve this Record?;ClientScript.RegisterClientScriptBlock(...);

我想从服务器端在asp.net中显示确认框:

我想从服务器端调用它,因为我必须从服务器端获取客户消息.我使用以下代码

string str = "Are you sure, you want to Approve this Record?"; ClientScript.RegisterStartupScript(typeof(Page), "Popup", "return confirm('" + str + "');",true); // More code ....

现在它显示弹出窗口,无论我点击什么,无论是“确定”还是“取消”,我的代码都在执行.

如果用户在确认框中选择“取消”,请告诉我如何限制执行代码.

看看这个:

代码背后:

string str = "Are you sure, you want to Approve this Record?"; this.ClientScript.RegisterStartupScript(typeof(Page), "Popup", "ConfirmApproval('" + str + "');", true);

ASPX:

function ConfirmApproval(objMsg) { if(confirm(objMsg)) { alert("execute code."); return true; } else return false; }

这个asp.net服务器端的确认框,真的能确保数据安全无误吗?