views:

55

answers:

1

I have a ASP.NET page that contains a formview and ObjectDataSource. On the page I only have 4 fields that are bound to fields in my datasource. My datasource contains 10 fields. When I call an update it is setting the 6 fields I am not binding to to null. The only way I can find it get around this is to add hidden fields for the 6 unbound fields and bind them to the datasource.

Is there anyway around this without using hidden fields? I would think that it should only update the fields you are binding to and ignore the others.

Any suggestions?

Thanks.

A: 

The solution is to just change by hand the Update Code on the datasource of your formview.

Just remove the fields that you do not won to update. Its a simple SQL command.

Aristos
That won't work for me. The reason is I am doing about a 10 step process on 10 different pages with only one object and storing the object in the session when i move between pages. So when I set the object in the session it is reseting all the values that are not on the current page. I don't want to run the sql until they have finished the last page so I need to store the state of the object in between pages somehow without losing values.
Dan
@Dan I have lost you, if you can place some code here then maybe I can help you more.
Aristos