ASP.NET中使用AJAX时如何弹出对话框
2007-05-13 05:27
591 查看
在ASP.NET页面上添加AJAX控件后,不能调出窗口的解决办法:
ASP.NET2.0中AJAX使用新的ScriptManager 类来管理,而不兼容原来的 ClientScriptManager 类 ,所以用
<script>alert('提示:产品添加成功!')</script>和
this.ClientScript.RegisterClientScriptBlock(this.GetType(), "name", "<script>alert('提示:产品添加成功!');</script>", true);
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "name", "<script>alert('提示:产品添加成功');</script>", true);
这些方法都是无效的.
可以用以下方法写代码实现
ScriptManager.RegisterStartupScript(UpdatePanel1, UpdatePanel1.GetType(), "", "alert('提示:产品添加成功!');if(confirm('是否继续添加?取消转到产品管理页')){alert('本页面继续添加')}else{window.open('productManage.aspx','_self');}", true);
ASP.NET2.0中AJAX使用新的ScriptManager 类来管理,而不兼容原来的 ClientScriptManager 类 ,所以用
<script>alert('提示:产品添加成功!')</script>和
this.ClientScript.RegisterClientScriptBlock(this.GetType(), "name", "<script>alert('提示:产品添加成功!');</script>", true);
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "name", "<script>alert('提示:产品添加成功');</script>", true);
这些方法都是无效的.
可以用以下方法写代码实现
ScriptManager.RegisterStartupScript(UpdatePanel1, UpdatePanel1.GetType(), "", "alert('提示:产品添加成功!');if(confirm('是否继续添加?取消转到产品管理页')){alert('本页面继续添加')}else{window.open('productManage.aspx','_self');}", true);
相关文章推荐
- asp.net使用ajax后如何在客户端弹出提示对话框
- asp.net使用ajax后如何在客户端弹出提示对话框
- ASP.NET2.0中ClientScriptManager的用法(使用ASP.NET 2.0 AJAX 弹出对话框)
- 在使用ASP.NET AJAX时用alert弹出对话框
- 使用ASP.NET 2.0 AJAX 弹出对话框
- 在asp.net 使用ajax 弹出的JS对话框
- asp.net在用ajax的时候如何弹出对话框
- 如何在ASP.NET中使用弹出对话框?
- ASP.NET2.0中ClientScriptManager的用法(使用ASP.NET 2.0 AJAX 弹出对话框)
- Treeview控件如何在asp.net ajax中使用小技巧
- ASP.NET中如何弹出对话框
- asp.net ajax 无法弹出JS对话框
- asp.net中如何弹出对话框
- 【ASP.NET】如何在asp后台实现弹出对话框
- Treeview控件如何在asp.net ajax中使用小技巧
- ASP.NET 使用alert弹出对话框后,CSS样式失效,字体变大的解决方法
- NET使用了UpdatePanel后如何弹出对话框!
- asp.net使用response.redirect后无法弹出对话框解决办法
- 在Asp.net中如何实现弹出提示对话框
- NET使用了UpdatePanel后如何弹出对话框!