views:

252

answers:

2

How do you (in Visual Studio) compare the controls in the different templates in a formview so you can track down a ViewState error?

A: 

I know you can use the ChangeMode method on an Asp:DetailsView control to set the mode and therefor which template is used on the client side.

I think you can do the same with a FormView.

You can either set the mode explicitly on the client side or set it as a result of actions on the server side.

CMPalmer
A: 

I ended up putting copies of every control in all three templates. If I didn't use the control in that template I would simply put it in a PlaceHolder control with it's visability set to FALSE. These unused controls have only the required attributes with nothing bound to them.

craigmoliver