I have a FormView through which I set up the default new
, update
and delete
commands for communicating with an SQL Server database.
When the CREATE
command is executed the data is added to the database and some images are uploaded to a server and linked to the database.
Problem
When I press the Visual Studio's default FormView DELETE command I obviously only delete the selected row in the database and not the images on the server.
I marked the uploaded images with images ID + "name"
, so I could delete them if I could only retrieve the ID of the row being deleted by the DELETE command.
How do I do retrieve the ID of the deleted row in C#?