Compatibility


Those who have written custom controls for ASP.NET 2.0 may look at the ScriptManager and wonder why many of the APIs are the same as what already exists on the ClientScriptManager object. The ASP.NET 2.0 ClientScriptManager was written to support postbacks and callbacks where the burden of partial page updates was left to the control developer. The ScriptManager focuses on enabling partial page rendering for controls natively. To allow the ScriptManager to effectively update parts of the page, custom controls need to use its methods for registering script so that partial page updates will correctly manage the script with the browser.

Controls can typically be updated to work with partial rendering by simply exchanging the calls to the ClientScriptManager for calls to the new ScriptManager control. For example, the ASP.NET validator controls registered JavaScript with the ClientScriptManager and would fail to execute correctly during partial page updates but work correctly after being updated to call the equivalent ScriptManager controls.




Professional ASP. NET 2.0 AJAX
Professional ASP.NET 2.0 AJAX (Programmer to Programmer)
ISBN: 0470109629
EAN: 2147483647
Year: 2004
Pages: 107

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net