Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > where to put load of static data?

Reply
Thread Tools

where to put load of static data?

 
 
=?Utf-8?B?Q2hyaXM=?=
Guest
Posts: n/a
 
      10-03-2005
Hi,

I am wondering where in my ASP.NET application to load a dropdown list box
that
basically only changes once a year.

I load a drop down list box with about 40 locations. If it never changes
should I put it in the page load event of the page?

Could I not put the loading of the dataset into the applicaton start event? or
cache it on server in some way? Each time a new user visits the page and
before it has been added to view state, it accesses the database. I'd like to
minimized access to the database for something that never changes.

thanks

Chris
 
Reply With Quote
 
 
 
 
Mr Newbie
Guest
Posts: n/a
 
      10-03-2005
One way is to create an XML file with your locations in and store it in the
local directory of your project. You can use the page_laod event to load
this into a dataset and then bind the DropDown to the dataset, this way when
you want to change the locations, you need only change the XML file.




"Chris" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I am wondering where in my ASP.NET application to load a dropdown list box
> that
> basically only changes once a year.
>
> I load a drop down list box with about 40 locations. If it never changes
> should I put it in the page load event of the page?
>
> Could I not put the loading of the dataset into the applicaton start
> event? or
> cache it on server in some way? Each time a new user visits the page and
> before it has been added to view state, it accesses the database. I'd like
> to
> minimized access to the database for something that never changes.
>
> thanks
>
> Chris



 
Reply With Quote
 
 
 
 
rviray
Guest
Posts: n/a
 
      10-03-2005

I would do what Mr Newbie said and put it in an XML file...but to g
further, I would then load it into Server Cache (for a little bi
faster performance) with a Dependency on that XML file...so that whe
your list changes (next year...possibly), the Cache will update base
on the change

--
rvira
-----------------------------------------------------------------------
rviray's Profile: http://www.msusenet.com/member.php?userid=421
View this thread: http://www.msusenet.com/t-187109512

 
Reply With Quote
 
Mr Newbie
Guest
Posts: n/a
 
      10-03-2005
Good point regarding dependency!

Regards Mr Newbie . . . .




"rviray" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> I would do what Mr Newbie said and put it in an XML file...but to go
> further, I would then load it into Server Cache (for a little bit
> faster performance) with a Dependency on that XML file...so that when
> your list changes (next year...possibly), the Cache will update based
> on the change.
>
>
> --
> rviray
> ------------------------------------------------------------------------
> rviray's Profile: http://www.msusenet.com/member.php?userid=4211
> View this thread: http://www.msusenet.com/t-1871095120
>



 
Reply With Quote
 
=?Utf-8?B?Q2hyaXM=?=
Guest
Posts: n/a
 
      10-03-2005
thanks for responses.

The locations are coming from data table that is used extensively by other
websites and applications.

I also created a data relations (child parent) using 2 fields in the
locations table.
I would have to manually create the XML with the Relations created manually.

Later I can write a tiny application that exports the list of locations
using the datarelation to an XML file.

On further thought I think I will stay with the database load for now and use
server caching to speed things up a bit.

thanks for replies.

Chris

"Chris" wrote:

> Hi,
>
> I am wondering where in my ASP.NET application to load a dropdown list box
> that
> basically only changes once a year.
>
> I load a drop down list box with about 40 locations. If it never changes
> should I put it in the page load event of the page?
>
> Could I not put the loading of the dataset into the applicaton start event? or
> cache it on server in some way? Each time a new user visits the page and
> before it has been added to view state, it accesses the database. I'd like to
> minimized access to the database for something that never changes.
>
> thanks
>
> Chris

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
put static keyword inside the JSP scripplets error Matt Java 3 03-15-2012 10:10 AM
Where should I put my config file, and how to load it? Ian Bridgeman Ruby 5 11-26-2009 09:09 AM
why does the following with Queue, q.put('\x02', True) not put itin the queue? Gabriel Rossetti Python 3 04-25-2008 03:41 PM
Load Balancing / Load Sharing over parallel paths ciscortp@hotmail.com Cisco 1 11-21-2005 03:57 PM
Why would the library-activated serviced components put more load on db? =?Utf-8?B?U3Rhbg==?= ASP .Net 1 02-27-2004 12:19 PM



Advertisments