losing state

M

Mr. SweatyFinger

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.

I have a "Create new ad" page with a formview1 that ties to the "ads" table,
In this form I have a drop down list "categories", which pulls its items
from the "categories" table

The page starts out in insertItem mode and the "categories" populates
dynamically based upon the value in a hidden field "s1" for instance the
value could be "shoes"
It pulls all the shoe items from the categories table.

The page saves, and I have to manally write the categories selections to
another table.

So then the page goes to <itemtemplate> mode.

I get the error becuase at this point, the "categories" drop down list has
reverted to its default value, instead of using the value in the hidden
field "s1"

i guess i need to re-assign the hiddenfield to be "shoes" at some point
after the save and before the <itemtemplate> loads.

how / where would i do that?
am i right?

Thanks
 

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,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top