1

The question is the same as I wrote in header: "How Disable ASPxButton after click to prevent double clicking using javascript on front code side?" In asp.net i can do this operation like this:

<asp:Button ID="btnSubmit" runat="server" Text="Submit"
OnClick="btnSubmit_Click"
UseSubmitBehavior="false"
OnClientClick="this.disabled='true'; this.value='Please wait..';"/>

and it works correctly. In Dev express i tried to do that similarly:

<dx:ASPxButton ID="btnSubmit" runat="server" Text="Submit"
OnClick="btnSubmit_Click"
UseSubmitBehavior="false">

<ClientSideEvents Click="this.disabled='true'; this.value='Please wait..';" />
</dx:ASPxButton>

but it doesnt work correctly.. What I'm doing wrong and how to fix it?

3
  • Have you tried "this.parent.disable = 'true'"? Could be that 'this' is not refering to the button, but to you ClientSideEvents. Commented Nov 13, 2015 at 12:23
  • why do you not check whether this button is disabled or not?? Commented Nov 13, 2015 at 12:34
  • FreddieH Tried add ".parent" but it still doesnt work.. Commented Nov 13, 2015 at 13:16

1 Answer 1

1

According to Dev Express:

https://www.devexpress.com/Support/Center/Question/Details/Q454635

Use the ASPxClientButton.SetEnabled method to disable the ASPxButton on the client side. Note, the SetEnabled method result is not sent to the server side when a request is performed. This means that the disabled/enabled state is not synchronized with the server-side object. If you want to synchronize disabled states between client and server sides, for example, you can use the ASPxHiddenField control, containing the disabled state and restore it on the server side.

Sign up to request clarification or add additional context in comments.

1 Comment

we are talking about aspxbutton from devexpress

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.