Newbie : Setting Application Wide Data

  • Thread starter Thread starter Ash
  • Start date Start date
A

Ash

Where is the best place to define application wide data (not necessarily
config settings), and why? eg. suppose I wanted to define an array of valid
image file types (*.bmp, *.gif, *.jpg), is it best to store this as an
application array in the global.asax, or set of XML nodes in the appSettings
of the web.config file, or neither.

tia
Ash
 
You could store this information in web.config, but you'd probably have to
write a custom handler to parse the data. I find the easiest way is to have
a class which exposes global application-wide data through static methods or
properties (so you don't have to instantiate the class to get the data).

Mun
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top