473,407 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Button.Enabled property not being set

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
rs****@fnis.com

Nov 17 '05 #1
0 1191

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Lapchien | last post by:
I'd like to add an 'Admin' form to my db, just a plain and simple (!) form with 7 buttons, each button just runs macro1, macro2, macro3 and so on. But - I'd like each button to only have focus...
4
by: Arif Çimen | last post by:
Hi to everybody, I have chnged a button text in design mode. But After compiling and executing the program the text of the button do not change to new value. Any Ideas? Thaks for helps.
5
by: Vern | last post by:
I would like to disable a button on the form if the user is not authorized to use it. I've created a custom button and would like for each button to know if it should be enabled or disabled...
9
by: JezB | last post by:
How can I programatically stop a Button or an ImageButton from causing a postback ? I just want it to do nothing.
9
by: mosscliffe | last post by:
I am sorry but I am all very new and slow at understanding all this ASP.NET2. I found some code which showed how to page with a repeater. All very excited as I had been looking for this all...
1
by: Mike P | last post by:
How do you disable the edit button for selected rows in a gridview? Here is my button : <asp:CommandField ShowEditButton="True" ButtonType="Link" ShowCancelButton="True" UpdateText="Update"...
0
by: Roberto Kohler | last post by:
I created an enhanced Button Control in ASP NET 2.0 to add a delete confirmation message and to disable the button if the user does not have access. The new button control has a "ConfirmMessage"...
0
by: Curious | last post by:
I have a child form that inherits a parent form. There are buttons on the parent form: protected Button continueButton; protected Button pauseButton; protected Button retryButton; Since the...
17
by: govolsbaby | last post by:
Is there a way to leave the button forecolor unchanged when it is disabled? I have multiple buttons on the form and depending on various user inputs, some will or will not be enabled but I'd...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.