Valid file types

A

Aschel Kritsos

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
 
E

Eric

Ash,

It depends on the circumstances - if those values aren't likely to change,
or will only change if you will be making code changes requiring a build,
then you could declare those values in a constant. Since they are
implicitly shared, they don't have to reside in the global.asax.

If you'd like to be able to change the values without recompiling the
application, the appSettings would probably be your best bet.

Eric
 

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

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top