Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trying to set button's Enabled property from Client & Se
Message
 
 
To
26/06/2008 19:24:39
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 3.0
OS:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01326508
Message ID:
01327108
Views:
11
Hi Dan,

I believe it has something to do with using UpdatePanel, but I didn't have time to investigate this problem father yet.

So far it looks like I can not set Enabled property in Server and Client side. However, I can trick it and set using ClientManager through JavaScript again, but it sounds a bit too complex...

Better understand exactly why it's not working.

>>Hi everybody,
>>
>>I have a button on my page that I set Enabled property to false in the Load event (I can also do it in ASPX directly).
>>
>>I also have a GridView with checkboxes. I added JavaScript code to enable the button once I click on the checkbox.
>>
>>In the server side code for the button I also try to disable it again using this.btnApprove.Enabled = false;
>>
>>I found two problems:
>>
>>1) I had a confirmation message for this button that doesn't appear anymore (in the ASPX OnClientClick).
>>
>>2) When I enable button in the Client side using disabled = true; I can no longer disable the button from the server-side code.
>>
>>Do you know what may be wrong? One important thing - I'm using UpdatePanel & UpdateProgress on this page. The button is not included into UpdatePanel (it triggers it).
>>
>>Thanks a lot in advance.
>
>Are there many checkboxes trying to influence a single button? or is it 1 checkbox/button?
>Try it without the "this."
>Just a guess but I have found the 'this' reference to be unreliable.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform