[英]Why doesn't my JavaScript execute from my code behind?
Here is my aspx file: Default.aspx (I do not think this is relevant) 这是我的aspx文件: Default.aspx (我认为这不相关)
And here is my C# code-behind file: Default.aspx.cs 这是我的C#代码隐藏文件: Default.aspx.cs
Here is my debug output. 这是我的调试输出。 It shows that everything up to the JavaScript line gets executed:
它显示了直到JavaScript行的所有内容都已执行:
[4476] aspx.page: Begin Load
[4476] : Number of fields = 2
[4476] : Page to load = Login
[4476] : Session matched the supplied GUID!
[4476] aspx.page: End Load
I am totally lost. 我完全迷路了。 I'd really appreciate some help!
我真的很感谢您的帮助!
@Mike:如果您的页面中没有ScriptManager,则ScriptManager.RegisterClientScriptBlock方法将不起作用,请使用以下方法:
ClientScript.RegisterClientScriptBlock(this.GetType(), "DummeyKey", "alert('Hi')", true);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.