Solved

Uncheck a Checkbox

Posted on 2011-09-27
7
394 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 74

Expert Comment

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

Author Comment

by:meiprogram
Comment Utility
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
Comment Utility
--->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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:meiprogram
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
I just put it in an update-panel and it works Thanks.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now