CheckBox Change Event

P

Paul Smith

I have entered some code in the CheckBox CheckChanged event, but it does not
seem to be function. I want to run some code when the check box is changed,
and code run depending on it's checked or unchecked state.

Private Sub chkLeg1Won_CheckedChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles chkLeg1Won.CheckedChanged
If chkLeg1Won.Checked = True Then
[code option 1]
Else
[code option 2]
End If
End Sub

Currently this does not work - can anyone explain why?

This must be relevant...... I have a button on the web form at present that
I am just using for testing something else. Whenever this is clicked, the
code branch of the above code fires. There is no mention of the checkbox in
the Button_click event????????
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top