Is there a built-in asp.net way to conditionally serve pages, for example I want the following logic:
If there is a session data I generate
a page, if there is no session data I
serve the cached page.
I am only interested in knowing about a built-in asp.net mechanism for this. If it does not exist I am probably going to simply cache my page manually and decide whether to serve it or not for each request, based on the session data availability.
I don’t think there is built-in support (like
varyByParam) for generating fresh output for users with Session Data.As you suggest, I would recommend manually caching the pages. I would probably determine the user’s Session state in the
PreRequestHandlerExecuteevent handler in theGlobal.asaxand then maybe set: