Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7987857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:16:04+00:00 2026-06-04T12:16:04+00:00

I have a web form using custom validators (to set textbox borders to red)

  • 0

I have a web form using custom validators (to set textbox borders to red) and I would like to check that at least one of a group of eight checkboxes have been checked (and possibly set the borders for the checkboxes to red too).

As I have a set of if statements making sure a true or false is returned for each checkbox, I thought I could add a counter and if the counter equals 0 to set Page.IsValid to false. Well that idea didn’t work. Doesn’t look like you can set Page.IsValid directly.

Then I thought to pop the counter value into a hidden field and validate that, but I can’t seem to get the syntax right to use a custom validator on a hidden field.

What is the best solution for this?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T12:16:06+00:00Added an answer on June 4, 2026 at 12:16 pm

    what’s wrong with you customvalidator? all you need is something like

    
    protected void validateCheckBoxes_ServerValidate(object source, ServerValidateEventArgs args)
    {
       if(!CheckBox1.Checked && !CheckBox2.Checked && !CheckBox3.Checked)
          args.IsValid = false;
       else
          args.IsValid = true;
    }
    
    

    the if is saying ‘if none of the checkboxes are checked, then we have a problem.’

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can you have custom client-side javascript Validation for standard ASP.NET Web Form Validators? For
Using Visual Studio 2008, I need to create a custom web form that when
I am developing a web form using Visual Web Developer Currently I have class
I have created a simple web app/form using google app engine. the site is
I am using ExtJs4.I have a form in my web application in which there
I have a web form where I have a textbox in which the user
I have a web form that collects information and submits it to a cgi
I have a web form that manipulates records in a MySQL database. I have
Within my web application I am using some custom validation for my form fields.
I have built a web form with some tables and custom controls inside it,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.