We are using the following code in a code behind page
[CreateNew]
public AdminController Controller { get; set; }
and the following code within the controller class
[ServiceDependency]
public IAdminService Adminervice { get; set; }
this works fine for a normal aspx page.
I would like to audit a Session starting event in my application and I'm using the global.asax events to do so.
However the controller has not been instantiated here
protected override void PrePageExecute(System.Web.UI.Page page)
{
if (Controller == null)
{
// controller is null...
}
}
How can I access the controller from the global page using the [CreateNew] attribute?