On Jun 3, 11:59 am, "Jonathan Wood" <jw...@softcircuits.com> wrote:
> Okay, so I created a generic IHttpModule class to globally intercept
> Page_Init in order to set the page's theme based on the user's database
> settings.
>
> I have this working except one problem: I have some help pages, in a
> separate folder, that use a separate style sheet. Is there any way to detect
> these pages in my handler and not set the theme for these pages?
>
> Thanks.
>
> Jonathan
Hi
you can use a simple trick
use
context.Request.FilePath of HttpContext to get the path
and check wheither it is in your help path...
and perform your operation
private void Application_BeginRequest(Object source,
EventArgs e)
{
// Create HttpApplication and HttpContext objects to
access
// request and response properties.
HttpApplication application = (HttpApplication)source;
HttpContext context = application.Context;
string filePath = context.Request.FilePath;
if (filePath.Contains("Help"))
{
//do some thing
}
}
Best of luck
Munna
www.munna.shatkotha.com
www.munna.shatkotha.com/blog
www.shatkotha.com