Solved

Uncheck a Checkbox

Posted on 2011-09-27
7
396 Views
Last Modified: 2012-05-12
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
Comment
Question by:meiprogram
  • 4
  • 2
7 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 36710178
In what function are you executing that code?
0
 

Author Comment

by:meiprogram
ID: 36710209
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
 
LVL 41

Expert Comment

by:guru_sami
ID: 36710714
--->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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Author Comment

by:meiprogram
ID: 36710734
No -> So is your client-side validation disabled?
Yes -> And is your Checkbox Changed set to AutoPostBack="true"?
0
 
LVL 41

Accepted Solution

by:
guru_sami earned 500 total points
ID: 36710800
And did you set the breakpoint and see if you are hitting the cbAttest.Checked = False statement?
Is UpdatePanel involved in this process?
0
 

Author Comment

by:meiprogram
ID: 36710815
Yes I set the break-point and it is hitting the code.

No it is not in an update panel.
0
 

Author Comment

by:meiprogram
ID: 36710841
I just put it in an update-panel and it works Thanks.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question