Joe,
It really depends on how your Domain objects are organized.
If a Domain object is strictly used by a single Page, I would put the
property in that page's code behind, if it is used by a group of pages, then
I would add a second layer base class for that group of pages. Note: I would
consider 2 pages a group! ;-) For example PageBase is the base page for all
web forms, while TeamPageBase is the base page for "team" web forms, and
UserPageBase is the base page for "user" web forms. Which means both
TeamPageBase & UserPageBase inherit from PageBase.
Alternatively if there is a root Domain object that all other Domain
objects, my PageBase would offer this root...
As far as configurable, generally I "configure" it when I design the class.
This Domain object will always be X, hence my sample is Session, changing it
to Y, would be a design change, based on performance data collected from
running the app. Design changes would require a recompile of the VS.NET
project & redistribute.
If there was a design requirement for it to be "user admin" configurable,
then I would look at creating a provider of sorts, where the web.config had
an entry for what provider to use, and there would be providers for Session,
Viewstate, Cache, Application, and etc...
The provider would follow the Plug-in pattern, similiar to the provider
pattern in ASP.NET 2.0
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspnet/html/asp02182004.asp
Note if I supported the provider option, the settings in the web.config
would be in a custom configuration section.
I would not use a select case in this case, as Select cases are not OO...
However that is a different discussion. See
http://www.refactoring.com/catalog/replaceConditionalWithPolymorphism.html
for a start on that discussion ;-)
Hope this helps
Jay