I'm looking for a way to disable a button before the call of a method and enable when the method has ending.
Code should be something like that:
Btn.Enabled = false;
MyMethode();
Btn.Enabled = true;
But the Btn still be enable.
NB: All the controls are in an UpdatePanel.
I have tried with Js:
ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "document.getElementById('BtnClone').disabled = true; ", true);
ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "document.getElementById('BtnClone').disabled = false; ", true);
The Button stay enable.
Thanks
I have solve the problem with this code in the aspx.
It's create a loading message , until the update panel is ready.