Monday, June 30, 2014

C# autopostback with an update panel on the master page

I have come across an issue where the CMS (such as Ekrtron) uses an update panel on the master page, which may cause postbacks on a control to instead be sent as partial postbacks. This can lead to code not executing as expected.

One fix is to include front-end JavaScript to force a postback, but this can be messy and JavaScript can be disabled by the user.

I have found that you are able to register a control as a postback control (even when you can't access the update panel directly). Simply paste the following line into the page load and reference the control you wish to invoke a full postback.

No comments:

Post a Comment