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

  • Home
  • SEARCH
  • 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 7548381
In Process

The Archive Base Latest Questions

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

In my asp page I used 2 asp panel controls.The second panel was not

  • 0

In my asp page I used 2 asp panel controls.The second panel was not visible as the style property of it was set to hidden.Panel 2 is displayed through javascript code which change the style property to visible according to the value of a checkbox in panel 1.
On postback although the panel 2 is hidden its asp validations are pop up and the postback is not happening.I tried to disable the server controls via javascript,but its not working.

Can someone help me in this?

function DisablePanel() {
var div_to_disable =document.getElementById('<%=Panel1.ClientID%>').getElementsByTagName("input");
var children = div_to_disable;
for (var i = 0; i < children.length; i++) {
children[i].disabled = true;
    };
}
function EnablePanel() {
var div_to_disable = document.getElementById('<%=Panel1.ClientID     %>').getElementsByTagName("input");
    var children = div_to_disable; //.childNodes;
    for (var i = 0; i < children.length; i++) {
        children[i].disabled = false;
    };
}
   function ShowPanel2() {
   var panel = document.getElementById('<%=Panel2.ClientID %>');
   if (panel.style.visibility == 'hidden') {
       EnablePanel();
       panel.style.visibility = 'visible';
   }
   else { DisablePanel();
       panel.style.visibility = 'hidden';
} 
  • 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-30T09:41:05+00:00Added an answer on May 30, 2026 at 9:41 am

    These posts might help you; Basically you have to just call ASP.NET inbuilt JS function ” ValidatorEnable” after the disable method call

    Enable/disable asp.net validator controls within a specific "ValidationGroup" with jQuery?

    http://geekswithblogs.net/jonasb/archive/2006/08/11/87708.aspx

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

Sidebar

Related Questions

I have an asp.net page within which I've used several AJAX controls doing partial
I'm working on updating a classic ASP web page used by a number of
I have used JQuery within my asp.net page. JQuery is working fine. I could
I’ve used the asp.net login control on my sharepoint custom master page. All works
Coming from a Classic ASP background, I'm used to multiple forms on a page,
I have an ASP .NET page where I use jQuery. I used this function
I have developed a web site and used update panel controls on all pages.
I have several asp:panels on a webform page which is used together with an
I have used update panel and in that update panel I have kept ASP
jquery ui accordion is used for navigation in ASP .NET MVC2 site.master page. Accordion

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.