C#web弹出提示框的几种方法?
在C#制作网站中我用到的弹出提示框的方法如下:
构造一个函数msgbox,然后调用。
#region 实现MsgBox功能 /// /// 显示“确定”点击以后就转到预设网址的提示框 /// /// 提示信息 /// “确定”以后要转到预设网址 /// 提示框JS public void MsgBox(string strMsg, string URL) { string StrScript; StrScript = (""); System.Web.HttpContext.Current.Response.Write(StrScript); } #endregion 调用一下试试:MsgBox("此新闻类别没有对应的新闻,系统将自动返回首页。", "default2.aspx"); |
在网上找到的其他C#弹出提示框方法:
http://hi.baidu.com/jmh_521/blog/item/26dfa1360e8b8ad8a2cc2b65.html
http://winsystem.ctocio.com.cn/75/11725075.shtml
http://blog.csdn.net/heling0223/archive/2009/10/27/4733007.aspx
新发现的一种方法很好用,推荐给大家: