I have a master page which has some user controls within an update panel.
I would like to put a property in this page to let the content pages to be able to enable/disable async postback way of working this page.
Can I achieve it programmatically?
Thanks
Move your update panel inside the pages that you wish to use it, and delete it from the master page. Or create a second PlaceHolder for page1 that is outside updatepanel.
UpdatePanel controls work by specifying regions of a page that can be updated without refreshing the whole page. This process is coordinated by the ScriptManager server control and the client PageRequestManager class. When partial-page updates are enabled, controls can asynchronously post to the server.
The collection includes AsyncPostBackTrigger and PostBackTrigger objects. Declarative triggers that are defined in the Triggers collection are not tracked in view state. When a control that is a naming container is used as a trigger, all its child controls that cause postback behave as triggers.
Yes you can. set EnablePartialRendering="false" on the ScriptManager, it will in effect disable the AJAX behavior of the UpdatePanel.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With