c# - "Hooks" in MVC3 -


i'm working on mvc3 project using c#, wondering if mvc3 has similar hooks in codeigniter (for executing code before each actionresult executes). need update arraylist of visited websites in session.

edit: i've worked out solution using actionresult, i'll post here reference.

actionfilter:

public class historytracker : actionfilterattribute {     public override void onactionexecuting(actionexecutingcontext filtercontext)     {         // code here     } } 

global.asax.cs

 protected void application_start()     {         // ...         globalfilters.filters.add(new historytracker());     } 

this makes actionfilter trigger.

you looking actionfilters.


Comments