How can I clean up the database with webparts delete event.

I have a web part in which I get the data from user and save them in the database.

I also save the webpartid along with the user data.

How can I delete the entries in the database when the user deletes the webpart (using the delete verb)?

How can I add an extra event handler to the delete verb?

Who is Participating?
shankarmanickamAuthor Commented:
The webpart manager has on delete event.

We can clear the backend data base using delete event handler.

SAMIR BHOGAYTAFreelancer and IT ConsultantCommented:

You have to use the truncate table for that. try this it is working,
shankarmanickamAuthor Commented:
This is  a direct solution for the problem.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.