Newbie : Setting Application Wide Data

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
 
M

Munsifali Rashid

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top