我有以下代码,应该在我的客户端脚本中调用一个名为ShowPopup的函数,但是有理由,当我调用此函数时没有任何反应.
string pg = "Test";
ClientScript.RegisterStartupScript(this.GetType(), "Popup", "ShowPopup(pg);", true);
Run Code Online (Sandbox Code Playgroud)
如果我执行以下操作:
ClientScript.RegisterStartupScript(
this.GetType(), "Popup", "ShowPopup('Test');", true);
Run Code Online (Sandbox Code Playgroud)
它工作正常.它确实出现在弹出窗口中.知道我可能做错了什么.