消息框显示问题 [英] messagebox display problem

查看:84
本文介绍了消息框显示问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

消息栏显示在任务栏上(最小化)...

但是我希望消息框位于页面上方(在aspx页面的中心)

该怎么做?

有任何建议吗?

问候
karan

Message box is displayed at (minimized) at taskbar...

But i want the messagebox to come above the page(at the center of a aspx page)

how to do that?

any sugestion?

regards
karan

推荐答案

不要使用System.Windows.Forms.MessageBox()方法...它将产生这种错误……
而是使用ScriptManager类的RegisterStartupScript()静态方法在服务器端运行javascript以显示简单的警报消息.

Dont use System.Windows.Forms.MessageBox() method... it will create this kind of bugs......
instead use RegisterStartupScript() static method of ScriptManager class to run javascript on serverside to display simple alert message.

string msg = "<script>alert(''your custom message'');</script>";
ScriptManager.RegisterStartupScript(this, this.GetType(), Guid.NewGuid().ToString(), msg, false);


这篇关于消息框显示问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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