菜鸟请教高手 : 在c# 的 WebForm.aspx中怎么弹出MessageBox?急......
菜鸟请教高手 : 在c# 的 WebForm.aspx中怎么弹出MessageBox?
2005-10-24 09:13
2005-10-25 22:09

2005-10-26 14:13
2005-10-26 14:47
如果真要用MessageBox.show()的话,
在最上面的添加命名空间:
using System.Windows.Form
因为MessageBox.show()是Windows.Form
里面的方法
不过最好用三楼的方法!

2005-10-30 07:28
2005-10-30 18:05
2005-10-30 18:44
2005-11-01 13:51
private void MsgBox( string msg )
{
string strScript = "<script language='Javascript'>alert('" + msg + "');</script>";
Page.RegisterStartupScript("alert", strScript);
}
用的时候直接调用 MsgBox("要弹出内容");
2005-11-03 16:48
谢谢楼上,可以了,不过 不知道有没有办法改掉messagebox的标题
2005-11-04 15:34