I have a BasePage class that is the base class for all my pages.
This page does a lot of the rendering of the page, the header, footer etc.
This should of course not be done when the request is an atlas request, so in these cases I need to just call base.Render.
The problem is that I can't see any way of discovering that the current request is an Atlas request, it looks exactly the same as a regular request.
Any ideas?
PS: Rewriting to use master pages etc instead is not an option, would take way to much time as this is an enterprise application with several hundreds of pages inheriting the BasePage class.
Thanks,
Einar
One Way to find out whether a request is an Atlas Request is to use the following piece of code. It is based on my research using Reflector.
bool isAtlasRequest = ScriptManager.GetCurrent(this).IsInPartialRenderingMode;
Works, thanks!
Einar
No comments:
Post a Comment