Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Button.Enabled property not being set

Reply
Thread Tools

Button.Enabled property not being set

 
 
Rick Shide
Guest
Posts: n/a
 
      09-11-2003
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




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
<value> could not be set on property <property name> TonyDyer General Computer Support 0 02-14-2012 03:25 PM
Property not being set on ASP.NET control Garry McGelennon ASP .Net Building Controls 0 06-22-2004 02:58 AM
Is there a way to set the a CSS property to be explicitly the same as another CSS property? Joshua Beall HTML 1 12-10-2003 07:21 PM
Button.Enabled property not being set Rick Shide ASP .Net 0 09-11-2003 08:41 PM
'property value' could not be set on property 'propertyname' KJ ASP .Net Web Controls 0 08-26-2003 06:08 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57