gpt4 book ai didi

C# 服务器端确认 ASP.NET 中的对话

转载 作者:太空宇宙 更新时间:2023-11-03 16:09:51 25 4
gpt4 key购买 nike

如何得到以下结果(是否点击是):

点击按钮:

//First I am checking validations
//Then I am checking if pay grade is being overridden from the business layer
//If it is overriden:
ScriptManager.RegisterStartupScript(this, this.GetType(), "script", "confirm('You are overriding the existing pay grade. Do you want to Override ?');", true);
//If the user clicks Yes, more code to save new pay grade in the database is executed.
//Else nothing is done.

如果点击是我想继续执行下面的代码,否则下面的代码不执行

最佳答案

在确认对话前添加回车

ScriptManager.RegisterStartupScript(this, this.GetType(), "script", "return confirm('You are overriding the existing pay grade. Do you want to Override ?');", true);

关于C# 服务器端确认 ASP.NET 中的对话,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17923629/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com