为什么“page.clientscript.registerstartupscript”第二次不工作? [英] Why "page.clientscript.registerstartupscript" not working second time?
本文介绍了为什么“page.clientscript.registerstartupscript”第二次不工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Page.ClientScript.RegisterStartupScript(this.GetType(), Guid.NewGuid().ToString(), "<script language=JavaScript>alert('Approved Successfully!!!');</script>");
我尝试过:
我尝试了codeproject.com的解决方案,该解决方案建议将bootstrap弹出模型添加到母版页的表单标记和一个脚本标记。但是它也没有用。
What I have tried:
I tried solution from codeproject.com that suggest to add bootstrap popup model to master page's form tag and one script to head tag. But its not working too.
推荐答案
我在代码中发现了错误,那就是我们无法在RegisterStartupScript中编写长语句...
I found the error in my code, that was we can't write long statement in the RegisterStartupScript...
这篇关于为什么“page.clientscript.registerstartupscript”第二次不工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文