Hi guys,
I have been working on adding/removing web controls on the fly in rows containing the same controls. I have used a Table control, and have handled the controls by creating DataRow and DataCell and putting the controls in cells. In this way they will be in the same place, and I can (hopefully) access their values.
I simply use a dropdown to set how many rows to create. Default is 1. If I choose 4 it works fine, but if I then choose 2 (after 4) I get the following error.
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 guess it is because I now place the last row (which is not the same as all the others) on a Row in th ...
Go to the complete details ...