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 6229655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:36:30+00:00 2026-05-24T09:36:30+00:00

I have a drop down (dropdown2) that is required IF there is something in

  • 0

I have a drop down (dropdown2) that is required IF there is something in it but it’s options data is driven by ajax from another dropdown (dropdown1) selection. Sometimes dropdown2 will be empty and in that case I can’t require it. So I can disable the requiredFieldValidators in javascript by calling this…

ValidatorEnable(document.getElementById(validatorId), false);

This works fine but the server still fires the requiredFieldValidator logic. Is anyone aware of how I can force the server to not validate if the validator is set to false client side?

  • 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-05-24T09:36:34+00:00Added an answer on May 24, 2026 at 9:36 am

    Why don’t you just use a client side validator? You are making your job much more difficult doing this. If you have access to it via the clientside, why are you bothering hitting it at the serverside?

    The only other thing I can think of is to create a hidden field and set it via the client side, and then when you do a postback to check this value and disable / enable the validator.

    For example after this:

    JS:

    ValidatorEnable(document.getElementById(validatorId), false);
    var hidden = document.getElementById(hiddenID);
    hidden = "1";
    

    Then in your load event:

    If (hidden = "1") then
     validator.enabled=false
    end if
    

    Take a look at this post, very similiar to yours: ASP.NET – how to stop unrequired server validation

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

Sidebar

Related Questions

i have a time dropdown that shows hour in one select, minutes in another
Is there any way to have a dropdown in excel that will show a
I have a CMS that requires a SQL query to return options/values for a
I am trying to write an MVC webpage that has two drop down lists.
I have an HTML form which contains a drop down, a tinyMCE textarea, and
I have a live search facility that narrows down results in a table as
Is it possible to create model rules that are dependent from selection? I have
Say you have a ServiceCall database table that records down all the service calls
We have a project that sets the DataSource of a combobox, but allows users
I have a dropdown list that stores name/value pairs. The dropdown appears in each

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.