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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T03:03:13+00:00 2026-05-30T03:03:13+00:00

I hope I can explain this properly. I have a grid that is part

  • 0

I hope I can explain this properly.

I have a grid that is part of our 3rd party shopping cart software. This grid has a row of quantity text boxes into which the customer enters how many of each thing they want to buy.

I put this grid inside a panel so I can set it on or off with

myPanel.Visible=true;

I also have a button to show and one to hide using the above code method.

If I enter a value into a textbox and then click the hide button and then click the show button, when the panel reappears the values are zero. If I then reload the page (browser reload) then the value returns as it was originally. It’s a pretty good magic trick but not what I need. What am I doing wrong?

Eventually I want to select a date from a calendar while it is hidden but that is not in play yet… just the show/hide buttons.

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-05-30T03:03:14+00:00Added an answer on May 30, 2026 at 3:03 am

    This sounds like the correct behaviour of ASP.NET WebForms and ViewState

    1. First page load: Panel is visible and the panel loaded with its initial values.
    2. Hide Panel: As soon as the button is pressed a post back occurs. myPanel is set to invisible which on the server side means that the HTML for the panel is not generated (this can be confirmed by looking the generated HTML).
    3. Show Panel: A post back occurs again. But because the values were not rendered in the previous step, they are not available in the ViewState to repopulate the panel.
    4. Reload of the page: This start the process over again (Same as step 1)

    A possible solution is to instead hide the panel (<div) on the client-side. This will also have the benefit of not making a round trip to the server to just enable/disable the panel.

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

Sidebar

Related Questions

I hope I can explain this right I have two input fields that require
I hope I can explain this properly. I'm making an android app that, when
I hope I can explain this properly. I'm using flashDevelop for an avatar creation
I hope I can explain this clearly enough. I have my main form (A)
I hope I can explain this well enough so that you can understand the
I hope I can explain this clearly: I have two tables with the following
I hope i can explain this clearly. I have a NSMutableArray * myMut. I
I hope I can explain this. I have an image which is stuck to
I hope this I can explain what I am trying to achieve: I want
I hope you can help me. I have a web service that needs to

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.