Do something on update, insert or cancel

  • Thread starter Thread starter David C
  • Start date Start date
D

David C

I want to run the same code after insert, update or cancel buttons clicked
on a FormView. I thought the ItemCommand would do it but that did not work
entirely as I have a Databind() for the GridView to show the new data but it
did not. Is it because the ItemCommand runs before the update is actually
done? How can I accomplish this? Thanks.

David
 
You can use events of the datasource. SqlDataSource has useful events like
Inserting, Inserted etc.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin


David C said:
I want to run the same code after insert, update or cancel buttons clicked
on a FormView. I thought the ItemCommand would do it but that did not work
entirely as I have a Databind() for the GridView to show the new data but
it did not. Is it because the ItemCommand runs before the update is
actually done? How can I accomplish this? Thanks.

David


__________ Information from ESET NOD32 Antivirus, version of virus
signature database 4312 (20090806) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


__________ Information from ESET NOD32 Antivirus, version of virus signature database 4312 (20090806) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
Back
Top