The good news is there different solutions but essentially the result is the same.
1. Do it manually via IHttpModule and IHttpHandler
Read more
2. Use AJAX Control Toolkit
Just replace
A few properties that need to be included:
EnableScriptLocalization="true" EnablePageMethods="true" EnableScriptGlobalization="true" ScriptMode="Release" CombineScripts="true"
You might run into issue with turning on the CombineScripts="true". IE sometimes throws "Out of Memory" error message caused by infinite loop in the TextBoxWatermark Control JavaScript code:
AjaxControlToolkit.TextBoxWrapper.registerClass('AjaxControlToolkit.TextBoxWrapper', Sys.UI.Behavior);AjaxControlToolkit.TextBoxWrapper.validatorGetValue = function(id) { var control = $get(id);if (control && control.AjaxControlToolkitTextBoxWrapper) { return control.AjaxControlToolkitTextBoxWrapper.get_Value();} return AjaxControlToolkit.TextBoxWrapper._originalValidatorGetValue(id);}
The last line (which calls _originalValidatorGetValue) basically calls back this exact function over and over because control.AjaxControlToolkitTextBoxWrapper is undefined.
If you encounter the above error you should set the CombineScripts to "false".
No comments:
Post a Comment