Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I disable an update panel programmatically?

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

like image 209
pencilCake Avatar asked Mar 10 '11 10:03

pencilCake


People also ask

How to disable UpdatePanel in asp net?

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.

What is update panel control?

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.

Which are the triggers present in update panel?

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.


1 Answers

Yes you can. set EnablePartialRendering="false" on the ScriptManager, it will in effect disable the AJAX behavior of the UpdatePanel.

like image 64
santosh singh Avatar answered Nov 15 '22 08:11

santosh singh