Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 408
  • Last Modified:

Uncheck a Checkbox

I have a form that I am validating, if the user misses a field, I send them back to question they missed.  At this point I want to uncheck a checkbox.  But the code doesn't work.
If bValid = False AndAlso cbAttest.Checked Then
     cbAttest.Checked = False
End If

Open in new window

0
meiprogram
Asked:
meiprogram
  • 4
  • 2
1 Solution
 
käµfm³d 👽Commented:
In what function are you executing that code?
0
 
meiprogramAuthor Commented:
I was doing it in the Validate function.  That didn't work.  So I but the following in the check-box checkchanged.
If Not ValidateForm(True) Then
   cbAttest.Checked = False
Else
   btnSubmit.Enabled = True
End If

Open in new window

0
 
guru_samiCommented:
--->if the user misses a field, I send them back to question they missed.
So is your client-side validation disabled?
And is your Checkbox Changed set to AutoPostBack="true"?
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
meiprogramAuthor Commented:
No -> So is your client-side validation disabled?
Yes -> And is your Checkbox Changed set to AutoPostBack="true"?
0
 
guru_samiCommented:
And did you set the breakpoint and see if you are hitting the cbAttest.Checked = False statement?
Is UpdatePanel involved in this process?
0
 
meiprogramAuthor Commented:
Yes I set the break-point and it is hitting the code.

No it is not in an update panel.
0
 
meiprogramAuthor Commented:
I just put it in an update-panel and it works Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now