简体   繁体   English

ScriptManager,ASP.NET Web窗体(4.5),Visual Studio 2013 Prof.,AJAX的问题

[英]Problems with ScriptManager, ASP.NET Web Forms (4.5), Visual Studio 2013 Prof., AJAX

I have the problem that I cannot use the ScriptManager in my ASP.NET Web Forms (4.5) anymore. 我有一个问题,我不能再在ASP.NET Web窗体(4.5)中使用ScriptManager。 It always throws the following critical JavaScript error messages (SCRIPT1002 is telling a syntax error) in Internet Explorer 11: 它总是在Internet Explorer 11中引发以下严重的JavaScript错误消息(SCRIPT1002正在告知语法错误):

在此处输入图片说明在此处输入图片说明

I tried to solve the problem with https://pavanarya.wordpress.com/2011/page/11/ and found out that WebForms.js shall cause the problem regarding to the decrypted WebResource.axd URL of the first error message (see above). 我尝试使用https://pavanarya.wordpress.com/2011/page/11/解决问题,发现WebForms.js会导致与第一个错误消息的解密WebResource.axd URL有关的问题(请参见上文) )。


Furthermore, I found out that the error vanishes if I remove the line 此外,我发现如果删除该行,该错误将消失

在此处输入图片说明 from my Layout.Master file. 从我的Layout.Master文件中。 All error messages vanish, but AJAX elements like TreeView (I also use UpdatePanel and Calendar) do not work anymore then, too. 所有错误消息都消失了,但是诸如TreeView(我也使用UpdatePanel和Calendar)之类的AJAX元素也不再起作用。


I also tried the Script Resource Viewer from http://www.dotneti18n.com/Downloads.aspx via http://www.guysmithferrier.com/post/2007/07/Script-Resource-Viewer.aspx . 我还通过http://www.guysmithferrier.com/post/2007/07/Script-Resource-Viewer.aspxhttp://www.dotneti18n.com/Downloads.aspx尝试了脚本资源查看器。 But the funny thing is that even the Script Resource Viewer implements the line 但是有趣的是,即使脚本资源查看器也实现了这一行

在此处输入图片说明
which exactly causes the same error as before, and so it is not a real help for me. 确实会导致与以前相同的错误,因此对我来说并不是真正的帮助。


It must be some global problem in the whole project since it does not accepts any ScriptManager (no matter in which ASPX file) anymore. 由于它不再接受任何ScriptManager(无论在哪个ASPX文件中),因此在整个项目中一定是一个全局问题。 Does someone know that problem? 有人知道这个问题吗?

Many thanks in advance!!! 提前谢谢了!!!


Remark: The Firefox Browser does not throw an error message, but it does not show the TreeView correctly, too. 备注:Firefox浏览器不会引发错误消息,但是也无法正确显示TreeView。 All images (ImageSet) of the TreeView are missing and the Web Browser displays text instead of the images. 缺少TreeView的所有图像(ImageSet),并且Web浏览器显示文本而不是图像。 I also use a Chart (System.Web.DataVisualization) in the Web project, it was the last item which was added there. 我还在Web项目中使用了一个图表(System.Web.DataVisualization),它是最后一个添加到其中的项目。 I use C#. 我使用C#。

I am unable to put this as comment. 我无法对此发表评论。 So I will put it as Answer: 因此,我将其作为答案:

Use ToolScriptManager instead of ScriptManager. 使用ToolScriptManager而不是ScriptManager。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM