Valid file types

Discussion in 'ASP .Net' started by Aschel Kritsos, Nov 11, 2003.

  1. 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
     
    Aschel Kritsos, Nov 11, 2003
    #1
    1. Advertising

  2. Aschel Kritsos

    Eric Guest

    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


    "Aschel Kritsos" <aschel.kritsos@[DELETEME]ecb.co.uk> wrote in message
    news:...
    > 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
    >
    >
     
    Eric, Nov 14, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sathyaish
    Replies:
    2
    Views:
    602
    Sathyaish
    May 22, 2005
  2. Robert Hanson
    Replies:
    4
    Views:
    8,599
    Yan-Hong Huang[MSFT]
    Aug 1, 2003
  3. Soren Kuula
    Replies:
    2
    Views:
    577
    Henry S. Thompson
    Dec 1, 2005
  4. Jeremy Cowles

    STD types vs C++ intrinsic types

    Jeremy Cowles, Aug 18, 2003, in forum: C++
    Replies:
    5
    Views:
    1,912
    Bob Jacobs
    Aug 19, 2003
  5. seven.reeds

    List of valid HTML friendly mime types

    seven.reeds, Apr 15, 2011, in forum: Perl Misc
    Replies:
    0
    Views:
    157
    seven.reeds
    Apr 15, 2011
Loading...

Share This Page