R
Rick Shide
I have a server-side button on a form that is not being disabled with the
enabled property.
C# code-behind
// this is the buttons onclick handler
private void CreateMetadataButton_Click(object sender, System.EventArgs e)
{
try
{
CreateMetadataButton.Enabled = false;
// a long process occurs here, the button remains enabled.
}
finally
{
CreateMetadataButton.Enabled = true;
}
}
The button remains enabled during the processing that occurs in the click
handler.
The click handler does finish, though, before any other clicks on that
button cause the handler to be called again.
How do I get the button to disable while until the my processing is done?
Rick Shide
(e-mail address removed)
enabled property.
C# code-behind
// this is the buttons onclick handler
private void CreateMetadataButton_Click(object sender, System.EventArgs e)
{
try
{
CreateMetadataButton.Enabled = false;
// a long process occurs here, the button remains enabled.
}
finally
{
CreateMetadataButton.Enabled = true;
}
}
The button remains enabled during the processing that occurs in the click
handler.
The click handler does finish, though, before any other clicks on that
button cause the handler to be called again.
How do I get the button to disable while until the my processing is done?
Rick Shide
(e-mail address removed)