Editing The Datasource

Ahh it’s all coming back to me now… the headaches that is 😛

One thing that I would always forget how to do with the new asp.net 2.0 data controls is how to enable editing using the datasource. I set up the sql statements for select, insert, update, and delete, but only select would work. when I update something and save, it just reverts back…

the problem is that I forgot to set the Datakeys property for the control which I want to edit. It must be set to the primary key of the table in order to enable “out of the box” editing.

back to work

-SelArom