windows应用程序中是 MessageBox.Show()
web应用程序中的对话框的代码应该怎么写?
web应用程序中的对话框的代码应该怎么写?
解决方案 »
- 已有打开的与此命令相关联的 DataReader,必须首先将它关闭
- mvc2 <%=Html.ActionLink() %>问题
- 谈谈对nhibernate看法,真实感受啊。
- 如何使用 request 对象获得 多选列表的内容?????????? 急!!!!!!
- 请教一个关于数据库移库操作的问题!
- 怎么样保存<input type=file>这东西
- 打开一个刚打开的页面,为什么他不刷新,怎么样让他刷新!!!急急急!!!!!!!!!
- 模板标签
- 请问有在.NET环境下使用过CELL5.1组件或插件的吗?
- 请问,是否只有在 IIS + .NET FrameWork 下才能支持aspx页面?
- 有没有asp.net版本的"在线编辑器"啊?
- textbox怎么得到焦点
confirm()
prompt()
你自己上网搜一下这三个方法的应用
{
Response.Write("<script>alert('" + strMsg + "')</script>");
}
{
msg = msg.Replace("\n","\\n");
msg = msg.Replace("'","\'");
Response.Write("<script>alert('" + strMsg + "');</script>");
}
/// 该函数用于通过调用javascript脚本来显示信息
/// </summary>
/// <param name="strMessage">>需要显示的信息</param>
/// <param name="objUrl">需要跳转的页面</param>
public static void ShowMessage(string strMessage,object objUrl)
{
System.Web.HttpContext.Current.Response.Write("<script language=javascript>");
if(objUrl!=null)
{
System.Web.HttpContext.Current.Response.Write("window.location='");
System.Web.HttpContext.Current.Response.Write(objUrl.ToString());
System.Web.HttpContext.Current.Response.Write(@"';");
}
System.Web.HttpContext.Current.Response.Write("alert('");
System.Web.HttpContext.Current.Response.Write(strMessage);
System.Web.HttpContext.Current.Response.Write(@"');");
System.Web.HttpContext.Current.Response.Write("</script>");
}