This is a migrated thread and some comments may be shown as answers.

Disable Button On Submit in User Control

4 Answers 288 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Felipe Saldana
Top achievements
Rank 1
Felipe Saldana asked on 27 Mar 2009, 12:59 AM
I am having trouble disabling (visibility = hidden or display = none or disabled = true) an asp:Button that is contained in a user control when it is clicked.


My user control is in an asp:panel that is ajaxified by a RadAjaxManager.

I have added javascript to the onClick attribute (for the actual button in the user control) that performs this.style.display =none

I have also added a javascript method in the page that contains the RadAjaxManager and its does not work either.

Nothing I try seems to disable the button when I click.


Any ideas?

4 Answers, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 31 Mar 2009, 09:52 AM
Hello Felipe Saldana,

Try returning false from the client function that disables the buttons. This will prevent it from making a postback. If you need the postback, you can disable the button on the server or attach a start up script to the page that should hide the button.

If the problem persists, could you post your aspx, ascx and code behind.

Thank you.

Best Regards,
Tsvetoslav
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Felipe Saldana
Top achievements
Rank 1
answered on 31 Mar 2009, 11:52 PM
This button triggers a long running process ....I want to disable the button to prevent duplicate postbacks.  So I dont want to do it on the server side.

I didnt end up getting the button disabled but attacked the problem from a different path.

I display a modal tooltip and thus the user does not have access to the button.


0
Accepted
Tsvetoslav
Telerik team
answered on 03 Apr 2009, 02:34 PM
Hello Felipe Saldana,

I am glad that the issue you were facing has been resolved.

Feel free to contact us if you have any additional questions.

Best wishes,
Tsvetoslav
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
varun
Top achievements
Rank 1
answered on 13 Jul 2019, 04:56 PM
That's really cognitive information to know about such a indomitable and concrete stuffs. I stolidly respect that effort and hope to keep the good work as same as always. Thank you for being so workaholic, it has server us the way we want. Indeed , grateful  to you.
Tags
Ajax
Asked by
Felipe Saldana
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Felipe Saldana
Top achievements
Rank 1
varun
Top achievements
Rank 1
Share this question
or