TypeError:Sys.WebForms未定义 [英] TypeError: Sys.WebForms is undefined
问题描述
大家好!
我是ASP .Net的新手,我得到了TypeError:Sys.WebForms未定义 - Sys.WebForms.PageRequestManager.getInstance ().add_endRequest(完);我在webhost中运行网站时出错(在localhost中我没有这个问题)。
谢谢!
Fabio - 巴西
在formPri.aspx:
...
< ajaxToolkit:ToolkitScriptManager ID =TSMFormPrirunat =server
EnablePartialRendering =FalseAsyncPostBackTimeout =0>
< Scripts> ;
< asp:ScriptReference Path =/ sgf / js / inicializa.js/>
< / Scripts>
...
inicializa.js
jQuery(文件).ready(function(){
Sys.Application.add_init(AppInit);
函数AppInit(发件人){
Sys.WebForms .PageRequestManager.getInstance()。add_endRequest(End);< ----错误就在这里
}
函数End(sender,args){}
});
检查链接:
http://forums.asp.net/t/1333182.aspx [ ^ ]
提示:
放弃ajaxToolkit:ToolkitScriptManager
并采用jquery!
你想使用ajaxToolkit表示你想通过ajax实现你的函数异步。
现在,ajaxToolkit已经过时了。
你可以通过jquery ajax实现你的所有功能和jquery插件。
点击以下链接:
http://plugins.jquery.com/ [ ^ ]
http://api.jquery .com / jQuery.ajax / [ ^ ]
Hi all!
I'm newbie in ASP .Net and I get the "TypeError: Sys.WebForms is undefined - Sys.WebForms.PageRequestManager.getInstance().add_endRequest(End);" error when I run site in webhost (in localhost I haven't this problem).
Thank you!
Fabio - Brazil
In formPri.aspx:
...
<ajaxToolkit:ToolkitScriptManager ID="TSMFormPri" runat="server"
EnablePartialRendering="False" AsyncPostBackTimeout="0">
<Scripts>
<asp:ScriptReference Path="/sgf/js/inicializa.js" />
</Scripts>
...
In inicializa.js
jQuery(document).ready(function() {
Sys.Application.add_init(AppInit);
function AppInit(sender) {
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(End); <---- ERROR IS HERE
}
function End(sender, args) { }
});
check the link :
http://forums.asp.net/t/1333182.aspx[^]
tips:
abandon ajaxToolkit:ToolkitScriptManager
and adopt jquery !
That you want to use ajaxToolkit indicate that you want to implement you functions by ajax and asynchronous .
Now,the ajaxToolkit is outdated .
You can implement your all functions by jquery ajax and jquery plugins .
click below link:
http://plugins.jquery.com/[^]
http://api.jquery.com/jQuery.ajax/[^]
这篇关于TypeError:Sys.WebForms未定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!