It is important to think in object-oriented terms here: The global.asax FILE
is not part of your application. The Global CLASS is. So, yes, putting your
constants into the Global class would work, just as putting them into any
other class would work. As to whether or not you SHOULD put them there,
well, that depends on what the constants are used for. I recently lost my
check book. I looked for it for several days, and today I found it in a bag
that had a Valentine's Day card I had bought for my wife. In other words,
the reason I "lost" it was, I didn't take the effort to put it where it
belonged (logically). Classes are a great way to organize data and process.
As far as the app is concerned, it doesn' tmatter what class you put it in.
As far as YOU'RE concerned, it matters a lot.
As for caching them, well, they are constants. If you make them static, they
won't need to be cached, and you won't need an instance of a class to use
them. If you ever want to change them for future deployment or whatever,
storing them in the web.config file enables you to change them without
having to recompile.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.