PC Review


Reply
Thread Tools Rate Thread

CheckBox Change Event

 
 
Paul Smith
Guest
Posts: n/a
 
      15th Aug 2005
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????????


 
Reply With Quote
 
 
 
 
Lars Netzel
Guest
Posts: n/a
 
      15th Aug 2005
Do you have the AutoPostBack set to True on the Checkbox?

/Lars

"Paul Smith" <(E-Mail Removed)> wrote in message
news:42ffd9ae$0$17463$(E-Mail Removed)...
>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????????
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
Checkbox event to control other checkbox selections Ruth Microsoft Access Forms 3 25th Jun 2007 08:42 AM
CheckBox Change Event Soniya Microsoft Excel Programming 2 26th Apr 2005 02:18 PM
RE: Trigger an event on Checkbox change James Geniti Microsoft Excel Programming 0 1st Sep 2004 09:24 PM
Trigger an event on Checkbox change James Microsoft Excel Programming 2 1st Sep 2004 08:31 PM
checkbox checked change event question Matthew Louden Microsoft ASP .NET 2 18th Nov 2003 07:25 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:07 PM.