Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Prevent radio button state change
Message
From
26/03/2004 11:37:06
 
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
00890006
Message ID:
00890012
Views:
20
It sounds like you're displaying the MessageBox if the user clicks the second radio button (to true), and you're wanting to reset that second radio button to false if they select "NO", correct?

So, in your check_changed event handler, are you checking the value of the radio button and only displaying the MessageBox if that radio button is true? I think if you do this, then when it's reset to false your code shouldn't run again. Unless I'm missing something ....

~~Bonnie

>I have 2 radio buttons on a form, one of the radion buttons is set 'true'.
>
>If the user clicks the second radion button, I display a messagebox to notify the user about a potential problem. The user can revert the change by selecting 'NO' to the messagebox.
>
>My code to query the user is in the radio button's check_changed event.
>
>My problem is: If I set the radio button's checked value back to the original value in the check_changed event, the event re-fires and the messagebox is redisplayed. I am in an infinite loop at this point, until the user selects 'YES' to the messagebox.
>
>Is there a way to prevent the check_changed event from re-firing or use another event to do my check?
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform