ASP .Net Output Caching and Ajax Control toolkit

心不动则不痛 提交于 2020-01-05 03:58:06

问题


I'd like to know if there's a special way of implementing output caching and using a control from the ajax control toolkit. I keep getting a javascript error on a page with output caching and a tab control that says: ajaxtoolkit (my assembly prefix) is undefined.

This is the directive I added:

<%@ OutputCache Duration="3600" VaryByParam="none" %>

回答1:


Microsoft does not support output caching in combination with ScriptControls, Extenders, or ScriptManagerProxies that need ScriptReferences. A workaround to the issue is to include the script references these resources require on the main script manager, outside the output cached control.

More info here




回答2:


Since the output caching cannot be combined with the generated scripts by the AJAX framework yet (hopefully in a future version some similar behavior will be available crossing fingers), other type of optimization approach has to be made like replacing the ScriptManager for the ToolScriptManager.

http://blog.creonfx.com/performance/howto-optimize-rendering-speed-of-aspnet-ajax-websites



来源:https://stackoverflow.com/questions/664107/asp-net-output-caching-and-ajax-control-toolkit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!