R
Richard
I've developed a small ASPX template framework (based on Chun Li's
article on CodeProject:
http://www.codeproject.com/aspnet/headerfooter.asp#xx849313xx) which
uses a IHttpModule to apply usercontrols (e.g. header and footer) on
pages.
The module determines if templates should be added to the page using
Page.Request.Path. It matches the current adress to settings found in a
configuration-file...
It works like a charm except for one little problem with
HttpServerUtility.Transfer.
Server.Transfer doesn't change the path-related properties needed.
I realize that the Path-property might not be the correct property to
use in this particular case.
The documentation states that the HttpRequest.CurrentExecutionFilePath
property should change when Server.Transfer is called.
I've verified that it does on the target/child page by outputting the
variable.
The problem lies in the fact that the property hasn't changed in the
IHttpModule.
I'm using the HttpApplication.Context which is of type
System.Web.UI.Page to attach an eventhandler to the Page.Init-event.
Is this a bug or am I missing something here!?
I want a non-intrusive way to add templates to any page. This means
that the page can't know anything about templates, such as utilizing
RewritePath which might avoid the problem.
Regards,
Richard
article on CodeProject:
http://www.codeproject.com/aspnet/headerfooter.asp#xx849313xx) which
uses a IHttpModule to apply usercontrols (e.g. header and footer) on
pages.
The module determines if templates should be added to the page using
Page.Request.Path. It matches the current adress to settings found in a
configuration-file...
It works like a charm except for one little problem with
HttpServerUtility.Transfer.
Server.Transfer doesn't change the path-related properties needed.
I realize that the Path-property might not be the correct property to
use in this particular case.
The documentation states that the HttpRequest.CurrentExecutionFilePath
property should change when Server.Transfer is called.
I've verified that it does on the target/child page by outputting the
variable.
The problem lies in the fact that the property hasn't changed in the
IHttpModule.
I'm using the HttpApplication.Context which is of type
System.Web.UI.Page to attach an eventhandler to the Page.Init-event.
Is this a bug or am I missing something here!?
I want a non-intrusive way to add templates to any page. This means
that the page can't know anything about templates, such as utilizing
RewritePath which might avoid the problem.
Regards,
Richard