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?


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

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

0
 
SAMIR BHOGAYTAFreelancer and IT ConsultantCommented:
Hello,

You have to use the truncate table for that. try this it is working,
0
 
shankarmanickamAuthor Commented:
This is  a direct solution for the problem.
0
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.