Web.Config size

G

Guest

Hi,

I am creating a web application which contains a Header (user control). The
header contains some labels which displayes infomation specific to page like
whats this, some page caption etc.
I wish to add some dynamism to this so that page specific label texts can
be modified without recompilation. i think using a XML file will do , but
that too with overhead of opening and closing the file on every page (any
better options so that file can be read once and used till any changes to
file.)
secondly i thought to use web.cofig (may be by making a separate
configuration section), that would work fine so long as it is 5,10 or 20
pages, what if there are 50 or more aspx page, will that effect peformance?
if not will the size of configuration file matter if it grows e.g. 1MB.
Using a DB can also solve my purpose, but i dont want that.

Thanks
 
S

Scott Allen

Hi Tarun:

You can read the XML file into the cache as a single entry (or perhaps
multiple entries, depending on what you have), and then use the
CacheDependency class from System.Web.Caching to monitor the file for
changes. When the file changes, the dependency will kick out the cache
entries.

HTH,
 

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
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top