viewstate error, help!

  • Thread starter Thread starter Kevin Yu
  • Start date Start date
K

Kevin Yu

hi all

in a webform, there is a banner user control which dynamically construct the
navigation menu. by which I mean the menu item is added by code,

in a postback event, I got the following error for the controls' postback
event in the web form:

"Failed to load viewstate. The control tree into which viewstate is being
loaded must match the control tree that was used to save viewstate during
the previous request. For example, when adding controls dynamically, the
controls added during a post-back must match the type and position of the
controls added during the initial request. "

it's caused by the banner user control. (if I remove the banner control, the
page works fine). how can I fix this problem?

Kevin
 
You may have better luck in microsoft.public.dotnet.framework.aspnet. This
is the Windows Forms (desktop client applications) newsgroup.

Tom Dacon
Dacon Software Consulting
 
Back
Top