Trigger can not be made in asp.net.
You have to create in ms sql.
It will be automaticaly call.
For example :
Code:
create trigger del_cuser
on CurrentUser
after delete
As
Begin
Declare @UserId varchar(4)
Declare @Amount varchar(9)
Declare @Udate varchar(8)
select
@UserId=UserId,
@Amount=Amount,
@Udate=Udate,
from DELETED
insert into PreviousUser values(@UserId,@Amount,@Udate);
End
I have created this in ms sql in query analyze.
In this there are 2 tables.
Current users & Previous users.
Using this trigger when i delete a record from current user,this record will automaticaly inserted in Previous user.
Bookmarks