User Control First Load

J

Jose Rodriguez

This problem is a tricky one. I am working on an application that loads
dynamic user controls into a panel control. We were getting Viewstate errors
when the user clicked refresh. To fix it, I turned off the Enableviewstate
on the Panel. Now my logic to determine if the user control has been loaded
for the first time is broken. How can I detect a first load on a control
without the benefit of VIewstate? any pointers will be appreciated

Jose
 
A

addup

-- quote --
We were getting Viewstate errors when the user clicked refresh.
-- end quote --

what kind of errors?
I've loaded controls dynamically (is that a word?) into various
templated controls without any problems

--addup--
 
J

Jose Rodriguez

The error I am getting is as follows, I thought I was sure that the control
tree looked exactly the way it was supposed to, but the problem still
occurs. If you have any insights, they'd be appreciated

"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..."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,602
Members
45,185
Latest member
GluceaReviews

Latest Threads

Top