473,671 Members | 2,311 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

populating a Drop down list

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:dropdownlis t
Nov 18 '05 #1
6 2262
Both are ok.

for saving program code, you can choose DropDownList,

if your data come from db, two lines will give your the result
ddl.DataSource = yourProcedure;
ddl.DataBind();
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:dropdownlis t

Nov 18 '05 #2


What i mean is that the list should only be populated
when the user clicks on it.

Until then it should be empty

-----Original Message-----
Both are ok.

for saving program code, you can choose DropDownList,

if your data come from db, two lines will give your the result ddl.DataSource = yourProcedure;
ddl.DataBind();
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:dropdownlis t

.

Nov 18 '05 #3
Can you supply your reasoning for this requirement? This is not the
normal usage of this type of control. You can certainly populate the
list based on selections from other controls, but it might be
difficult to do using the onclick event of the listbox itself.
On Mon, 5 Jul 2004 07:28:15 -0700, "Casey"
<an*******@disc ussions.microso ft.com> wrote:


What i mean is that the list should only be populated
when the user clicks on it.

Until then it should be empty

-----Original Message-----
Both are ok.

for saving program code, you can choose DropDownList,

if your data come from db, two lines will give your the

result
ddl.DataSource = yourProcedure;
ddl.DataBind();
hello,

I need to populate a drop down list when the userclicks on the arrow button.

how do i do this.

Should i use a html select control or is it possible
using the asp:dropdownlis t

.


Nov 18 '05 #4
Dan,

I am connecting to server at a distant location to
retrieve the data for the listbox, and the data has to be
loaded up only when the user wants to look at the
information,

I know there are other ways of doing this but this is
requested by the user

can you give me any ideas on this..
-----Original Message-----
Can you supply your reasoning for this requirement? This is not thenormal usage of this type of control. You can certainly populate thelist based on selections from other controls, but it might bedifficult to do using the onclick event of the listbox itself.

On Mon, 5 Jul 2004 07:28:15 -0700, "Casey"
<an*******@dis cussions.micros oft.com> wrote:


What i mean is that the list should only be populated
when the user clicks on it.

Until then it should be empty

-----Original Message-----
Both are ok.

for saving program code, you can choose DropDownList,

if your data come from db, two lines will give your
theresult
ddl.DataSource = yourProcedure;
ddl.DataBind();

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:dropdownlis t


.


.

Nov 18 '05 #5
There is a user event that occurs when you click on the dropdown list
I think (not 100% sure). You may be able to link to that. However...

If you are going to go to the server to get the data, this will be a
significant pause to build the list. Also, when you come back, you
would have to manually "open" that list as if you just clicked on it.
Not exactly a smooth transition.

I suggest that you should be able to determine when the list would
need to be built and do this when necessary. Worst case, provide a
button that says "Load List" that the user can click and then populate
the dropdown list.
On Mon, 5 Jul 2004 14:19:26 -0700, "Casey"
<an*******@disc ussions.microso ft.com> wrote:
Dan,

I am connecting to server at a distant location to
retrieve the data for the listbox, and the data has to be
loaded up only when the user wants to look at the
information,

I know there are other ways of doing this but this is
requested by the user

can you give me any ideas on this..
-----Original Message-----
Can you supply your reasoning for this requirement? This

is not the
normal usage of this type of control. You can certainly

populate the
list based on selections from other controls, but it

might be
difficult to do using the onclick event of the listbox

itself.


On Mon, 5 Jul 2004 07:28:15 -0700, "Casey"
<an*******@di scussions.micro soft.com> wrote:


What i mean is that the list should only be populated
when the user clicks on it.

Until then it should be empty


-----Original Message-----
Both are ok.

for saving program code, you can choose DropDownList,

if your data come from db, two lines will give yourtheresult
ddl.DataSource = yourProcedure;
ddl.DataBind();

> 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:dropdownlis t
>
>
.


.


Nov 18 '05 #6

thanks for your help dan..

I will take your advice,

regards

casey
-----Original Message-----
There is a user event that occurs when you click on the dropdown listI think (not 100% sure). You may be able to link to that. However...
If you are going to go to the server to get the data, this will be asignificant pause to build the list. Also, when you come back, youwould have to manually "open" that list as if you just clicked on it.Not exactly a smooth transition.

I suggest that you should be able to determine when the list wouldneed to be built and do this when necessary. Worst case, provide abutton that says "Load List" that the user can click and then populatethe dropdown list.
On Mon, 5 Jul 2004 14:19:26 -0700, "Casey"
<an*******@dis cussions.micros oft.com> wrote:
Dan,

I am connecting to server at a distant location to
retrieve the data for the listbox, and the data has to beloaded up only when the user wants to look at the
information ,

I know there are other ways of doing this but this is
requested by the user

can you give me any ideas on this..
-----Original Message-----
Can you supply your reasoning for this requirement? This
is not the
normal usage of this type of control. You can
certainlypopulate the
list based on selections from other controls, but it

might be
difficult to do using the onclick event of the listbox

itself.


On Mon, 5 Jul 2004 07:28:15 -0700, "Casey"
<an*******@d iscussions.micr osoft.com> wrote:

What i mean is that the list should only be populated
when the user clicks on it.

Until then it should be empty


>-----Original Message-----
>Both are ok.
>
>for saving program code, you can choose DropDownList,
>
> if your data come from db, two lines will give your

the
result
> ddl.DataSource = yourProcedure;
> ddl.DataBind();
>
>> 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:dropdownlis t
>>
>>
>
>
>.
>

.


.

Nov 18 '05 #7

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

Similar topics

3
1782
by: Deb | last post by:
I am having a problem creating a form in Access 2000 which I have done with no problem in 97. I have an unbound drop down box. This idea is for the user to select from the drop down box and the fields below populate with the selected record. Then the user can make changes to the record. The problem is that this feature works only when the form is first loaded - one time only! So if the user selects another choice from the drop down,...
1
3827
by: lewindha | last post by:
Hey guys I'm trying to populate a drop down list with values from a db table. When I view the page, the drop list is empty. Here is the code: private void populateClients() { string connStr = "left blank for security reasons"; sqlConnection = new SqlConnection(connStr);
1
2476
by: msnews.microsoft.com | last post by:
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...
5
1619
by: TB | last post by:
Hi All: The following is probably a newbie question, but please bear with me: I am populating a drop down list with items from a database, and would the default selected item to be the current value of the corresponding field. I am doing something like this: ddlexample.DataSource = mydatareader ddlexample.DataValueField = "ID"
4
8066
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
5959
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...
6
3081
by: Rob Meade | last post by:
Hi all, Looking for a bit of help if possible. For about 2 weeks now I've been investigating the best way to populate related drop down menus, and have their values pre-populated again if the user clicks back with their selected options still selected - and I'm getting to the point where I might just popup a big window, perhaps with some flash in it and say "dont be lazy, select em again you great big freak of nature" because I am...
3
2320
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
14
4329
by: Philth | last post by:
Hi there, I've essentially got a form with several drop down, each populated by columns in various tables. The populating bit works fine - the column rows appear as they should in the menu. Ideally the user needs to make their selections, and enter the form into a new database table. The problem is, when the selection is entered into the new table, only the first word of the string is entered. For example, the drop down may have...
0
8473
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
8911
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
8819
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8667
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
7428
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
6222
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
4222
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2808
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
2048
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.