HighTechTalks DotNet Forums  

list control bind source - best practice

Dotnet Academic General Discussions microsoft.public.dotnet.academic


Discuss list control bind source - best practice in the Dotnet Academic General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Larry Foulkrod
 
Posts: n/a

Default list control bind source - best practice - 04-05-2005 , 04:19 PM






For the following scenario:

"I am populating a drop down list control with 5-10 items of static data.
This list control will appear in several ASP.NET pages."

What is the best practice? Should I,
a) Just add the items directly in the code?
b) Create an XML file with the items?
c) Store the items in a database?
d) Create a struct type with the items as properties?
e) Use a different method?

Thanks in advance for your help.

lfoulkrod (AT) nfp (DOT) NOSPAM.com.trash

Reply With Quote
  #2  
Old   
Peter van der Goes
 
Posts: n/a

Default Re: list control bind source - best practice - 04-06-2005 , 07:47 AM







"Larry Foulkrod" <lfoulkrod (AT) nfp (DOT) com.(nospam)> wrote

Quote:
For the following scenario:

"I am populating a drop down list control with 5-10 items of static data.
This list control will appear in several ASP.NET pages."

What is the best practice? Should I,
a) Just add the items directly in the code?
b) Create an XML file with the items?
c) Store the items in a database?
d) Create a struct type with the items as properties?
e) Use a different method?

Thanks in advance for your help.

lfoulkrod (AT) nfp (DOT) NOSPAM.com.trash
Think in terms of data volatility. Just how nonvolatile are the entries?
Sales tax rates, for example, are nonvolatile in the context of using
software on any given day, but do change over time. OTOH, the value of PI is
a true constant (at least, during my lifetime).
Any technique which embeds the data in your code costs more to maintain
unless you are dealing with true constants. Given the small number of data
items you've cited, any convenient external storage method would work.

--
Peter [MVP Visual Developer]
Jack of all trades, master of none.




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.