我需要在通过断点运行输出时显示警告消息框并继续下一个方法 [英] I need to display alert message box while run the output through breakpoint and continue to the next method

查看:52
本文介绍了我需要在通过断点运行输出时显示警告消息框并继续下一个方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在通过断点运行输出时显示警告消息框并继续下一个方法。但它跳过警报信息框...例如:我在Asp.net下面的代码需要这个代码



示例代码:

I need to display alert message box while run the output through breakpoint and continue to the next method. But it skips the alert message box... Ex: I need this below code in Asp.net

Sample Code:

if (bIsMsg == true)
{
strMsg = "Employeee 2Half Salary has been updated successfully to the Employee - '" + txtEmployeeName.Text + " for " + ddlmonth.Text + " - " + ddlyear.Text + "' ";
// MessageBox.Show(strMsg, Properties.Settings.Default.ProductName.ToString(), MessageBoxButtons.OK, MessageBoxIcon.Information);
ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "salary", "alert('" + strMsg + "');", true);
}

推荐答案

您所编写的是在服务器上执行的C#服务器端代码。所以在调试时,它不会显示警告框(因为它在客户端上运行)。为什么你甚至想这样做?

首先,alert是一种在浏览器中显示弹出模式的旧方法。它不符合新的UX标准。尝试jquery ui对话框等。
What you are writing is C# server side code which executes on the server. so while debugging, it won't display the alert box(as it runs on the client). Why do you even want to do that ?
1st of all, alert is an old way of display popup mode in browsers. It doesn't conform to new UX standards. try jquery ui dialog etc.


这篇关于我需要在通过断点运行输出时显示警告消息框并继续下一个方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆