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
405
Button in WebTab (async=on) and UpdatePanel fires server side click twice
posted

Version: same issue with 6.3 and 7.3 (latest i think) 

ASP.NET 2.0 (no service pack) 

As mentioned in the title I have a page with UpdatePanel (asp.net ajax) and inside it is an UltraWebTab. Inside one of the tabs I have a button with an associated server side click event handler. (regardless of number and which tab, the behavior is the same). After the page renders/loads, clicking on the button in the browser will fire the server side click event handler twice.

 This doesn't seem to be the case with WARP and WebTab (fires only once) but the reason I had to use UpdatePanel was because of AJAX control toolkit modalPopupExtender. This is actually another issue but in a nutshell, I need to postback to the server and call modalPopupExtender.Show( ) instead of just assigning the TargetControlD (which will popup the dialog on the client side). So, when modalPopupExtender.Show( ) is called from C# code the returned page doesn't show the dialog (unlike with UpdatePanel where the dialog is displayed correctly). With this, unless this issue is fixed in WARP I have to use UpdatePanel.

But as mentioned, the use of UpdatePanel on the other hand causes the button's server side click event handler to be fired twice. This causes a number of other side effects such as calls to a third party components which messes up when called twice in the same page request (a file upload component), performance hit and who knows what other issues. I think even if there is work-around (such as a flag to constrain number of times the event handler called per request) it would be best to have a fix rather than a workaround if indeed this is a bug.

Also, note that the issues occurs even if modifications are made to disallow redundant clicks as it is really takes just one click to make the event handler run twice.

I hope someone could look into this. 

Parents
No Data
Reply
  • 24497
    posted

    Hi Ryan,

    If you use UpdatePanel (or any other AJAX control), then you should keep in mind that AJAX controls are not compatible with async postbacks used by WARP and UltraWebTab. Therefore, they can not be nested in each other, but only can be used side by side.

Children
No Data