asp.net警报窗口 [英] asp.net alert window
本文介绍了asp.net警报窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我能够显示一些警告窗口。
Hi,
I am able to display alert window with some message.
catch (Exception exc)
{
var msg = exc.Message;
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "ALERT", "alert('error')", true);
}
但我想在alert中显示错误消息(excecptionObject.Message)。
怎么做?
这个工作正常
问候,
Arun
But i want to display the error message(excecptionObject.Message) in alert.
How to do that?
this is working fine
Regards,
Arun
推荐答案
您可以写:
Hi,
You can write :
catch (Exception ex)
{
Console.WriteLine("{0} Exception caught.", ex);
}
希望它能解决你的问题
谢谢
neha Sharma
hope it ll solve your problem
Thanks
neha Sharma
catch (Exception exc)
{
var msg = exc.Message;
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "ALERT", "alert('" + msg + "')", true);
}
这篇关于asp.net警报窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文