Forum Moderators: open
Just came across a strange 'feature' of asp.net this afternoon, and just wondered if anyone else has come across it, or has found the reason as to why it's happening.
It's a rather simple problem really, I have a datalist, with two buttons in it, a 'Cancel' button and a 'Delete' button. I disable it (using enabled = false). When I run it, everything LOOKS ok - the buttons are grayed out, even the mouse cursor changes to the large I (that's the technical work for it!) but, as I found today, the buttons can still be clicked. I'm not too sure if the button function is actually run, but my Javascript that I've assigned to the buttons is run.
Anyone else come across this problem? I'm just gonna have a go now at removing the javascript from the buttons if they're disabled from the code behind (where the javascript is assigned in the first place) but I'm kinda at a loss as to why this is happening at all!
I'd appreciate any enlightenment on this!
Cheers,
B