S
spartanNTX
Hello,
I am trying to create a custom HTTP module implementing
the IHttpModule interface. 1 event handler in the module
does not get passed the HttpApplication as an argument
when it is called. I need to Response.Redirect the user
after this event has taken place and I can not find a way
to access the Response object.
I have tried setting a class member variable equal to
the httpapplication object in the init method and also I
have tried creating a new HttpApplication() object but
neither seems to have any effect. Does anyone please have
any suggestions? Here are the two things I have tried:
private HttpApplication currentContext;//set in init()
public void CmsPosting_Approved( Object sender,
ChangedEventArgs e )
{
currentContext.Response.Redirect
("http://www.google.com",true);
}
//not working
//and
public void CmsPosting_Approved( Object sender,
ChangedEventArgs e )
{
HttpApplication app = new HttpApplication();
app.Response.Redirect("http://www.google.com",true);
}
//not working
The (PostingEvents)sender and (ChangedEventArgs)e object
don't contain any usefull methods or properties.
TIA!!!!!
I am trying to create a custom HTTP module implementing
the IHttpModule interface. 1 event handler in the module
does not get passed the HttpApplication as an argument
when it is called. I need to Response.Redirect the user
after this event has taken place and I can not find a way
to access the Response object.
I have tried setting a class member variable equal to
the httpapplication object in the init method and also I
have tried creating a new HttpApplication() object but
neither seems to have any effect. Does anyone please have
any suggestions? Here are the two things I have tried:
private HttpApplication currentContext;//set in init()
public void CmsPosting_Approved( Object sender,
ChangedEventArgs e )
{
currentContext.Response.Redirect
("http://www.google.com",true);
}
//not working
//and
public void CmsPosting_Approved( Object sender,
ChangedEventArgs e )
{
HttpApplication app = new HttpApplication();
app.Response.Redirect("http://www.google.com",true);
}
//not working
The (PostingEvents)sender and (ChangedEventArgs)e object
don't contain any usefull methods or properties.
TIA!!!!!