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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T09:56:04+00:00 2026-05-15T09:56:04+00:00

As per requirement I disabled all validation controls in page on PageLoad event in

  • 0

As per requirement I disabled all validation controls in page on PageLoad event in server side.

On clicking submit button I want to activate them and validate the page and if the page is okay submit other wise not.

I am able to enable all validaters but one thing that I am unable to understand is that they do not validate the page. I set alerts and check they are being enabled but they do not validate the page and let the page submit.

I am sorry I couldn’t get where I am wrong, may be there need to call some validation method as well or I should prevent default behavior of button. Please guide me.

Below is my script:

<script type="text/javascript">
    function NextClicked() {

        var _ddlStatus = document.getElementById("<%=ddlEmpStatus.ClientID%>");
        var _selectedIndex = _ddlStatus.selectedIndex;

        if (_selectedIndex == 0) {
            alert("Nothing selected");
        }<br/>
        else<br/>
            if (_selectedIndex == 1) {
            for (i = 0; i < Page_Validators.length; i++) {
                Page_Validators[i].Enabled = true;
            }
        }

    }
</script>
  • 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-15T09:56:05+00:00Added an answer on May 15, 2026 at 9:56 am

    From the server, you have to have them enabled before the button click; otherwise, I think you need to loop through the server-side collection and enable them, plus call their validate() method explicitly.

    Or, you can also try the client-side validatorenable method (http://forums.asp.net/t/1175267.aspx) to enable them.

    If you disable by setting Enabled = false from the server, you may have issues even using the client-side API altogether. Not sure about that though, just know that can be an issue with other controls.

    HTH.

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

Sidebar

Related Questions

I'm using RichFaces per a client requirement, but the markup it (and the stock
Per the example array at the very bottom, i want to be able to
I have modified a SharePoint visual studio workflow which works as per requirement on
For a requirement to generate per-PC license keys, I need some code which will
I am developing an application that can stream videos. As per requirement it should
I have the below jquery code I have customized it as per my requirement
I want to place all messages module-wise at one place. so that if any
Per man pages, snprintf is returning number of bytes written from glibc version 2.2
Per this helpful article I have confirmed I have a connection pool leak in
Per the Java documentation, the hash code for a String object is computed as:

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.