Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
799
Changes before WARP refresh
posted

Hi,

I'm using a WARP on a asp:content (conMain)

this WARP has a TriggerControl on an other asp:content. (btnStart on conHeader)

 

When clicking btnStart on conHeader, the WARP refreshes. This is (ofcourse) wanted functionality.

 

The problem is, when clicking the button, a hidden value changes, on which the content of the WARP relies.

SOO: what happens

1. Button is clicked

2. WARP refreshes with old values

3. hidden field is adjusted in the button_Click

4. WARP refreshes with the new values

 

How can i

a) check if the WARP is refreshed because of a TriggerControl

b) Let the refresh of the WARP wait until all the data is updated.

 

  • 799
    Verified Answer
    posted

    I solved this by browsing deep into the archives of the forum

     

    The solution i went with is the following

    • use javascript function to get the TriggerControl by adding RefreshRequest="WARP_refreshRequest" to the definition of my WARP
    • saving the ID of the field into a fidden field using the javascript
      function WARP_refreshRequest(oPanel, oEvent, id) {
          $get('ctl00_plhMain_hdnRefreshField').value = id;
      }
    • Based on the value of the hdnField, I get my new data.