I need to have this code run for each of my actions in one of my controllers. How can I do this without having to copy the code for each of the actions? Is there an init method for the controller?
System.Web.HttpSessionStateBase Sess = HttpContext.Session;
string pid = (Sess["PID"] != null ? Sess["PID"].ToString() : "");
string LogonTicket = (Sess["LogonTicket"] != null ? Sess["LogonTicket"].ToString() : "");
Why don’t you wrap this up into properties in a base controller?