tags:

views:

121

answers:

0

I have a button control which is disabled as soon as the user clicks a button (so that they don't click more than once if the waiting time is long). This is achieved like this

_buttonOk.OnClientClick = "disableDialogButtons();"
+ Page.ClientScript.GetPostBackEventReference( _buttonOk, string.Empty ) + ";";

I am now updating my application so that a loading panel will appear when the button is clicked. This works fine with all post backs except the dialog buttons as above. The page posts as expected but no loading panel will appear. I have been looking at the HTML and seen that this code is generated when the dialog button is inside a RadAjaxPanel (and also the .NET UpdatePanel)

<input style="width: 80px" id="_dialogButtons_DialogOkButton" onclick="disableDialogButtons();__doPostBack('_dialogButtons$DialogOkButton','');__doPostBack('_dialogButtons$DialogOkButton','')" value="OK" type="button" name="_dialogButtons$DialogOkButton" />

I don't know if the loading panel (RadAjaxLoadingPanel) won't show because of the double __doPostBack or if anything else is wrong.

If anyone could shed some light on this, I would really appreciate it!