Output caching your page (or the user control within which your drop down
list appears) would substantially mitigate any runtime performance issues
you may be concerned about if you were to populate the list at runtime. And
given that the content changes rather infrequently, you could (1) read the
content into a DataList (or your other favorite in-memory structure) and
save it in the application's Cache object. Then populate it from there at
runtime. You could even put a File Dependency on it so that when you modify
the XML file that contains your states list, the in-memory version in the
Cache automatically updates.
Separately, and not to split hairs, but you should tell us how you defnie
"best method" for populating the list. "Best" meaning "fastest runtime
performance"? "Best" meaning "most flexible in terms of the content that can
be specified at runtime"? "Best" meaning "least development time"?
Good Luck.
"msnews.microso ft.com" <no****@notvali d.com> wrote in message
news:O2******** ******@TK2MSFTN GP09.phx.gbl...
I'd like to hear your thoughts on best methods for populating drop down
list controls. I have states and countries drop down lists that don't change
often, so naturally I "hard code" them in the aspx page. But the problem
is these tend to really slow the development -- it takes up to 15 seconds for
the page to come up in VS.NET design environment, so I'm thinking about
taking these out and populating the controls dynamically using the
filesystem or an xml file. Easy enough to do, but will this then eat up
resources in runtime?
-Max