473,769 Members | 4,470 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

best method for populating drop down list control?

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
Nov 18 '05 #1
1 2488
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

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
2144
by: Ian Davies | last post by:
Hello I am trying to run a few INSERT queries only if the user clicks 'continue' in a <a href> The queries takes variables created from SELECT queries. I have tried to acheive this by putting The INSERT queries into a function at the top of my php file and having the SELECT queries below it. I have a message that pops up that includes a link to the function but I cant get this to work and am not sure of the best approach. Can anyone help?...
6
2269
by: Casey | last post by:
hello, I need to populate a drop down list when the user clicks on the arrow button. how do i do this. Should i use a html select control or is it possible using the asp:dropdownlist
3
6160
by: Don Wash | last post by:
Hi There! I have a Server-side Drop-down box in ASP.NET (VB) page. What do I do to widen the Drop down box's Pull-Down list's width? I'm not talking about the Drop-down box's width but the box that appear when user clicks the drop-down arrow button. Because items in the Drop down list are a little long, user can't see the full thing when they pull down the items from the drop down list.
4
1354
by: Irishmaninusa | last post by:
I am trying to populate a drop down on a form with the contents of a recordset and I am getting the following values in the dropdown System.Data.DataRowView and not the expected content that should be appearing in there. I have stepped through the code in debug mode and examine the value of the recordset, and the right values seem to be there. Any idea what is causing this and how to fix it so that it does not show up like this?
2
12622
by: Yoshitha | last post by:
hi I have 2 drop down lists in my application.1st list ontains itmes like java,jsp,swings,vb.net etc.2nd list contains percentage i.e it conatains the items like 50,60,70,80,90,100. i will select any skill in 1st drop down list then i'll select % of this skill in the 2nd list box , based on the percentage i've selected in the 2nd list box it has to display 2 sets of drop down list boxes at run time one for selecting skill and
4
8079
by: Pete Lux | last post by:
I have a drop down that populates on page load. The drop down brings in customer numbers from my local MSDE database. It does this fine, but I click a button that finds quotes for those customers and the next time I go to drop down the list, all the customer numbers are doubled (1015,1016,1017,1015,1016,1017..) How do I get that to stop? Do I have to check if it's a post back or something like that? I'm fairly new at this, if you...
2
3558
by: Richard Bysouth | last post by:
I'm sure this is something pretty trivial but can't seem to figure out how to do it. I'm using Generic Lists in quite a few places in my app and for some of them want to be able to create a ToString method that would return a formatted string array. For example, I might have a simple class as follows: Class Foo
2
5984
by: Jim in Arizona | last post by:
My goal, somehow, is to populate a dropdownlist with all the user names in active directory. I don't even know where to begin, really. I added a reference to System.DirectoryServices so I could use the System.DirectoryServices.ActiveDirectory namespace. I don't even know if this is the right way to go as I can't seem to find anything in that namespace that would help me query active directory for names. I can't use an LDAP query...
3
2324
by: DaveRook | last post by:
Hi I am using C# and Access databse for a web site. I have a drop down list which I need to populate dynamically according to results in a database. Example There will be 1 drop down list on the page which offers 3 makes of cars: Mazda, Honda, Ford
0
9591
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9425
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10225
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9867
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8880
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7415
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6676
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3969
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3573
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.