Advertisement

08.27.2008 at 07:20AM PDT, ID: 23682105
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.8

Loosing stack values on postback?

Asked by dba123 in Programming for ASP.NET

I believe I loose any stack values on postback.  I am hiding and showign panels and every time I do this, I loose my stack objects.

For example, in my code-behind I have something like this:

 

This first called:

        public void btnNewUser_NextStep_OnClick(object sender, EventArgs e)
        {
            // Hide/Disable logic
            NewUser.pnlNewUserHeader1.Enabled = false;
            NewUser.pnlNewUserContent1.Visible = false;
            this.pnlNewUserButtons.Visible = false;

            // Show logic
            SelectApplications.pnlSelectApplicationsHeader1.Enabled = true;
            SelectApplications.pnlSelectApplicationsContent1.Visible = true;
            Utility.IncrementStack(currentStep, 1);
        }

Then this is called when the user clicks on a button in the next panel and my stack values are lost here so the if statement always sees 0 for the stack value:

        private void btnSelectApplications_PreviousStep_OnClick1(object sender, EventArgs e)
        {
            // Hide/Disable logic
            SelectApplications.pnlSelectApplicationsHeader1.Enabled = false;
            SelectApplications.pnlSelectApplicationsContent1.Visible = false;
            Utility.DecrementStack(currentStep);

            // Show logic

            // TODO: This is just a hack for now until I finish the step logic 100%
            if (Utility.PeekStack(currentStep) == 1)
            {
                NewUser.pnlNewUserHeader1.Visible = true;
                NewUser.pnlNewUserContent1.Visible = true;
                this.pnlNewUserButtons.Visible = true;
            }
            else if (Utility.PeekStack(currentStep) == 2)
            {
                SearchUser.pnlExistingUserHeader1.Enabled = false;
                SearchUser.pnlExistingUserContent1.Visible = false;
            }
        }

 Do I need viewstate on or something or is it something elementary here?Start Free Trial
[+][-]08.27.2008 at 07:43AM PDT, ID: 22325295

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Programming for ASP.NET
Sign Up Now!
Solution Provided By: Chirag1211
Participating Experts: 1
Solution Grade: A
 
 
[+][-]08.27.2008 at 07:55AM PDT, ID: 22325463

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-42 / EE_QW_2_20070628