Problem
When moving an ASP.NET application that uses AJAX and has an update panel from .net framework 2.0 to .net framework 3.5 you might have a problem that 'AjaxControlToolkit' is undefined although you have included it and it works on the developer PC.
Actually this problem makes me hit my head on a wall as I did not see any reason for that error.
I looked for an Ajax Extensions msi setup for .net framework 3.5 but thanks to Microsoft it is included in .net framework 3.5 setup. So what is the problem.
Solution
In such situation googling will not provide you with a satisfactory answer for that. But I hope that after this post, I might save you tons of hours looking for a solution.
In Script Manager I have added a CombineScripts="false" property and it do the trick :)
So what is it means. Read the following paragraph that will illustrate in details:
The ToolkitScriptManager class derives from ScriptManager and enables the automatic combining of multiple script files in the corresponding web page. Any scripts (and localized script resources) coming from assemblies indicating their willingness to have their scripts combined (with the new assembly-level ScriptCombine attribute) will automatically be combined into one file for download by the user's browser. This combining action (and the automatic compression of the resulting file) can dramatically reduce the number of round-trips made by the browser to fetch scripts and correspondingly improve the page's responsiveness. The combined script file will be cached by the user's browser just like its individual parts would have been with the ASP.NET AJAX ScriptManager's default ScriptResource.axd behavior. Any changes to the page or the associated DLLs invalidates the cached copy of the combined scripts and prompts a re-download during the next page access.
This new behavior is enabled by default for ToolkitScriptManager and can be disabled by setting its CombineScripts property to "false". Assemblies containing scripts which should not be combined in this fashion for some reason may use the ScriptCombine attribute's ExcludeScripts/IncludeScripts properties to specify exactly which scripts can be combined. The absence of the ScriptCombine attribute on an assembly means that none of its scripts can be combined in this manner; this is an explicit opt-in model for Assemblies.
No comments:
Post a Comment