Click here to Skip to main content
15,888,454 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Trigger in asp.net Pin
Pravin Patil, Mumbai26-Sep-11 1:48
Pravin Patil, Mumbai26-Sep-11 1:48 
GeneralRe: Trigger in asp.net Pin
sheemap26-Sep-11 2:06
sheemap26-Sep-11 2:06 
AnswerRe: Trigger in asp.net Pin
Tech Code Freak26-Sep-11 5:03
Tech Code Freak26-Sep-11 5:03 
GeneralRe: Trigger in asp.net Pin
sheemap26-Sep-11 5:35
sheemap26-Sep-11 5:35 
AnswerRe: Trigger in asp.net Pin
Pravin Patil, Mumbai26-Sep-11 1:47
Pravin Patil, Mumbai26-Sep-11 1:47 
You first need to understand the trigger.

Here is a brief explanation :
Trigger is native to SQL and not to ASP.NET. Trigger is a code segment in SQL that gets executed when a specified condition is met. There are three types of trigger Inser, Update, Delete trigger. Insert Trigger will be executed when you insert a new row into the table. Same applies to update and delete trigger. So with this much explanation you must be clear that Trigger is the thing that is not called explicitly, rather SQL server will automatically execute your trigger when you insert, update or delete any record from the table.

Coming back to your question :
As you said, you know how to call a stored procedure, so call it as you do. Write a trigger on your desired table for a insert/update/delete operation. When the specified operation is performed in the Stored Procedure, trigger will be automatically fired by SQL.

Important : Trigger is in SQL and not ASP.NET. Trigger can not be executed explicitly as you do Stored Procedure. Trigger is taken care by SQL server.

For further reference :
How to Write Trigger
1. http://msdn.microsoft.com/en-us/library/ms189799.aspx[^]
2. http://www.sqlservercentral.com/Forums/Topic351362-92-1.aspx[^]
3. http://download.oracle.com/docs/cd/B12037_01/server.101/b10759/statements_7004.htm[^]

How Trigger Works
1. http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@Generic__BookTextView/47865;pt=47764[^]
2. http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28370/triggers.htm[^]

Hope this helps.
All the best.
I quit being afraid when my first venture failed and the sky didn't fall down.

GeneralRe: Trigger in asp.net Pin
sheemap26-Sep-11 1:56
sheemap26-Sep-11 1:56 
AnswerRe: Trigger in asp.net Pin
Pravin Patil, Mumbai26-Sep-11 18:42
Pravin Patil, Mumbai26-Sep-11 18:42 
AnswerRe: Trigger in asp.net Pin
NikulDarji27-Sep-11 0:41
NikulDarji27-Sep-11 0:41 
QuestionAutoCompleteExtender inside ModalPopupExtender Pin
PleaseHelpCP23-Sep-11 19:08
PleaseHelpCP23-Sep-11 19:08 
AnswerRe: AutoCompleteExtender inside ModalPopupExtender Pin
Ali Al Omairi(Abu AlHassan)25-Sep-11 20:50
professionalAli Al Omairi(Abu AlHassan)25-Sep-11 20:50 
QuestionDropDownList Pin
reyhane ramezanian23-Sep-11 6:02
reyhane ramezanian23-Sep-11 6:02 
AnswerRe: DropDownList Pin
TheGreatAndPowerfulOz23-Sep-11 6:24
TheGreatAndPowerfulOz23-Sep-11 6:24 
AnswerRe: DropDownList Pin
Dalek Dave25-Sep-11 21:40
professionalDalek Dave25-Sep-11 21:40 
JokeRe: DropDownList Pin
Pravin Patil, Mumbai26-Sep-11 1:51
Pravin Patil, Mumbai26-Sep-11 1:51 
QuestionCreating a new Website Solution by using http doesn't work Pin
nstk23-Sep-11 0:57
nstk23-Sep-11 0:57 
QuestionOn data binding EntityObjects to a FormView. Pin
Brady Kelly22-Sep-11 22:46
Brady Kelly22-Sep-11 22:46 
Questionformat a string in Data Repeater (list array as a data source) Pin
Farhad Eft22-Sep-11 20:25
Farhad Eft22-Sep-11 20:25 
AnswerRe: format a string in Data Repeater (list array as a data source) Pin
Parwej Ahamad22-Sep-11 23:20
professionalParwej Ahamad22-Sep-11 23:20 
GeneralRe: format a string in Data Repeater (list array as a data source) Pin
Farhad Eft22-Sep-11 23:37
Farhad Eft22-Sep-11 23:37 
GeneralRe: format a string in Data Repeater (list array as a data source) Pin
Parwej Ahamad22-Sep-11 23:41
professionalParwej Ahamad22-Sep-11 23:41 
QuestionIssue with modalpopup on master page. Pin
shock58922-Sep-11 19:23
shock58922-Sep-11 19:23 
AnswerRe: Issue with modalpopup on master page. Pin
Parwej Ahamad22-Sep-11 23:24
professionalParwej Ahamad22-Sep-11 23:24 
AnswerRe: Issue with modalpopup on master page. Pin
jagdish Bhandari23-Sep-11 1:16
jagdish Bhandari23-Sep-11 1:16 
QuestionExport dataset to Excel Pin
countmein22-Sep-11 12:10
countmein22-Sep-11 12:10 
AnswerRe: Export dataset to Excel Pin
uspatel23-Sep-11 2:47
professionaluspatel23-Sep-11 2:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.