A: 

The page is not available in PreRequestExecute. This function is called before asp.net steps in to handle things, and asp.net is responsible for the page. Think of PreRequestExecute as being earlier in the scheme of things, like when IIS is first trying to figure out what to do with this thing it has, the thing is not even a page yet.

You might want to look into some of the other events that you can hook, there are events that would take place after the page has loaded that may allow you to do what you are suggesting.

aepheus
A: 

Rather than going into global.asax for this, consider using master pages. One possibility is to have nested master pages, where the first master page sets up overall layout, and the nested master handles the theme. (Or one of several nested master pages, all referencing the same top-level master page). If necessary, you can use the PreInit event in the page to change master pages, and select the master that matches your theme selection.

You can centralize this function by having your own class that inherits System.Web.UI.Page, and have all your own pages inherit this new class. Handle the PreInit event there. (As well as other useful functions, like page-level handling of unhandled exceptions, general security issues, etc.

EDITED TO ADD: As @aepheus correctly notes, the page hasn't been instantiated at the PreRequestHandlerExecute event. So there's no page class you can access.

Cylon Cat