如何在将数据提交到表并禁用父页面时显示消息框 [英] how to show message box when data is submitted to table and disable the parent page
本文介绍了如何在将数据提交到表并禁用父页面时显示消息框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好先生,
提交数据时我必须显示消息框或弹出给用户而我正在使用这个脚本问题是,当这个框打开时,父页面不显示我必须将父页面显示为禁用表单。我的脚本位于
hello sir,
when data is submitted i have to shoow message box or pop up to user and i am using this script the problem is that when this box is open parent page is not displayed and i have to show parent page as a disable form.my script is at code behind
ClientScript.RegisterClientScriptBlock(this.GetType(), "btn", "<script type = 'text/javascript'>alert('Data has been submitted successfully..');'height=700,width=1200' </script>");
提前感谢
thanks in advance
推荐答案
您需要使用ClientScript.RegisterStartupScript而不是ClientScript.RegisterClientScriptBlock。下面是代码片段
You need to use ClientScript.RegisterStartupScript instead of ClientScript.RegisterClientScriptBlock. Below is code snippet
ClientScript.RegisterStartupScript(this.GetType(), "btn", "<script type = 'text/javascript'>alert('Data has been submitted successfully..');'height=700,width=1200' </script>");
这篇关于如何在将数据提交到表并禁用父页面时显示消息框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文