if(typeof(Sys)==='undefined')抛出新的错误('ASP.NET Ajax客户端框架无法加载。') [英] if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client-side framework failed to load.')

查看:123
本文介绍了if(typeof(Sys)==='undefined')抛出新的错误('ASP.NET Ajax客户端框架无法加载。')的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

即时搜索此错误两个常规日。在web.config中进行了很多更改。

ajax post方法无法用于网络方法。



它在控制台中显示以下错误



http:// localhost:5500 / ProfileEdit.aspx / GetState无法加载资源:服务器响应状态为404(未找到)



我有一个名为GetState的web方法,它在visual studio 2012中工作,它仍然在Visual Studio 2012中工作,但是在视觉中合并文件之后工作室2013它没有工作,并显示上面的错误。



我试图更改ajax最新的dll但它也没有工作..显示与上面相同的错误..





如果有人有解决方案那么请帮助我。



谢谢。

i m searching this error from two regular days.After many changes in web.config.
ajax post method not working for web method.

It shows below error in console

http://localhost:5500/ProfileEdit.aspx/GetState Failed to load resource: the server responded with a status of 404 (Not Found)

I have a web method with name GetState that was working in visual studio 2012 and it's still working in Visual Studio 2012 but after merging file in visual studio 2013 it's not working and shows above error.

I tried to change ajax latest dll but it also not working..shows same error as above..


if anyone have solution then Kindly help me.

Thanks.

推荐答案

为什么不写作

Why not writing just
if (!Sys) {
   // you cannot use Sys
}



请记住 Sys 也是一个对象。在这种方法中,你在undefined和null(JavaScript中的不同对象)之间没有区别,但在很多情况下,不必进行这种区别。



剩下的你的帖子对我来说不是很清楚,抱歉。欢迎您提出后续问题。



-SA


Remember that Sys is also an object. In this approach, you make no difference between undefined and null (different objects in JavaScript), but in many cases this difference does not have to be made.

The rest of your post is not quite clear to me, sorry. Your follow-up questions will be welcome.

—SA


这篇关于if(typeof(Sys)==='undefined')抛出新的错误('ASP.NET Ajax客户端框架无法加载。')的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆