[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[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.2

DropDownList items lost after postback, when inside a dynamic Panel-type custom control

Asked by jimbobmcgee in Programming for ASP.NET, C# Programming Language, .NET Framework 2.x

Tags: ASP.NET, .NET 2.0, C#, Visual Studio 2005

I have attached a very simple sample of some ASP.NET files that are causing me problems.  Inside the ZIP is a cut-down version of a dynamic custom control and an implementing ASP.NET page.

If I put a dropdown list inside the custom control, when it first loads, items are added to the dropdown.  After postback, these items are lost.  ViewState appears not to be loaded for the dropdown inside the panel.

The panel is added to the custom control's Controls collection, in the CreateChildControls override.  I have also tried adding the panel in OnInit, OnLoad, LoadViewState and TrackViewState.  All do the same thing and lose the items.

I want to know why ViewState is not loaded for the dropdown inside the panel.  I've struggled for over three hours with this now...

J.

PS: I've had to rename all the files in the ZIP to .txt to get around the overly-sensitive extention check on the attachments facility -- remove the .txt extention and import the files into a VS2005 Web App Project.
Attachments:
 
Sample app that demonstrates the problem
 
[+][-]09/22/09 10:53 AM, ID: 25395572Accepted Solution

View this solution now by starting your 30-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

Zones: Programming for ASP.NET, C# Programming Language, .NET Framework 2.x
Tags: ASP.NET, .NET 2.0, C#, Visual Studio 2005
Sign Up Now!
Solution Provided By: jimbobmcgee
Participating Experts: 2
Solution Grade: A
 
[+][-]09/08/09 10:21 PM, ID: 25288446Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

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

 
[+][-]09/08/09 11:25 PM, ID: 25288655Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

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

 
[+][-]09/09/09 05:14 AM, ID: 25290313Author Comment

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625