Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > populating a Drop down list

Reply
Thread Tools

populating a Drop down list

 
 
Casey
Guest
Posts: n/a
 
      07-05-2004
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


 
Reply With Quote
 
 
 
 
Edward
Guest
Posts: n/a
 
      07-05-2004
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:dropdownlist
>
>



 
Reply With Quote
 
 
 
 
Casey
Guest
Posts: n/a
 
      07-05-2004


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:dropdownlist
>>
>>

>
>
>.
>

 
Reply With Quote
 
Dan Brussee
Guest
Posts: n/a
 
      07-05-2004
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"
<> 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:dropdownlist
>>>
>>>

>>
>>
>>.
>>


 
Reply With Quote
 
Casey
Guest
Posts: n/a
 
      07-05-2004
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"
><> 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:dropdownlist
>>>>
>>>>
>>>
>>>
>>>.
>>>

>
>.
>

 
Reply With Quote
 
Dan Brussee
Guest
Posts: n/a
 
      07-05-2004
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"
<> 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"
>><> 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:dropdownlist
>>>>>
>>>>>
>>>>
>>>>
>>>>.
>>>>

>>
>>.
>>


 
Reply With Quote
 
casey
Guest
Posts: n/a
 
      07-05-2004

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 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"
><> 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"
>>><> 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:dropdownlist
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>.
>>>>>
>>>
>>>.
>>>

>
>.
>

 
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
retrive preselected value in second drop down list from the first drop down list weiwei ASP .Net 0 01-05-2007 07:29 PM
Auto Drop down a Drop Down List xxbmichae1@supergambler.com Javascript 5 11-23-2005 01:35 AM
binding to current value in a drop down list when populating from a database TB ASP .Net 5 11-02-2005 08:59 PM
New to .NET, can I have one drop down box control the data of another drop down box using a database? SirPoonga ASP .Net 2 01-07-2005 10:44 PM
best method for populating drop down list control? msnews.microsoft.com ASP .Net 1 08-07-2004 07:25 PM



Advertisments