473,405 Members | 2,287 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

DropDownList - Sample (vb) of how to do Muliple Linked Together?

I have been away from VB for a while, but now trying to figure out how to
have several DropDownLists on a web page, whereby when I pick a value in the
first list, it will show a narrowed list of choices on the 2nd list, etc.

For example, if on my left hand side, I pick, "Colorado", the box to the
right of it, might list just cities in Colorado

Can anyone point me to an example of doing that....preferably using XML as
the data store of place names, but any examples that show this would be
appreciated.

Thanks in Advance.

Dano
Feb 11 '06 #1
1 965
I will admit that I have never really done anything with XML, but I have
done what you want to do with DropDownLists using databases, and the idea is
basically the same with XML. Follow these basic steps:

1. Set all but the last of the DropDownLists' AutoPostBack properties to
true.
2. In the SelectedIndexChanged event for these DropDownLists write the code
to clear and repopulate the DropDownLists whose content is dependent upon
the selection of the DropDownList that was changed. When using databases, I
simply generate a Select statement and bind the results to the
DropDownLists, since I have never worked with XML you'll need to figure out
something with an effect on your own.
3. If you are afraid the AutoPostBack technique will cause too many
postbacks or think people would manually ask to have the lists updated (and
sometimes this is the case, you decide what's best in your situation) place
a Button next to each DropDownList that says something like "Update City
List" and place the same type of code in the Button's Click event.

For more help on the XML part of this, you'll need to ask someone else
and/or see some of the other newsgroups (there is at least one for
specifically XML, and the microsoft.public.dotnet.framework.adonet group
might have some good suggestions. Good Luck!
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Dano" <da*****@hotmail.com> wrote in message
news:YF******************@bignews4.bellsouth.net.. .
I have been away from VB for a while, but now trying to figure out how to
have several DropDownLists on a web page, whereby when I pick a value in
the first list, it will show a narrowed list of choices on the 2nd list,
etc.

For example, if on my left hand side, I pick, "Colorado", the box to the
right of it, might list just cities in Colorado

Can anyone point me to an example of doing that....preferably using XML as
the data store of place names, but any examples that show this would be
appreciated.

Thanks in Advance.

Dano

Feb 11 '06 #2

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

Similar topics

4
by: DotNetJunky | last post by:
I have built a control that runs an on-line help system. Depending on the category you selected via dropdownlist, it goes out and gets the child subcategories, and if there are any, adds a new...
6
by: Sebi | last post by:
Hello all, I'm thinking about overwriting the ListItem, so it can contain x additional values (not only one). Has anybody ever tried this? Has someone got an example (C#)? Can DropDownList...
5
by: Bob N | last post by:
I have an ASP.NET web page -- several auto-post back DropDownLists that perform a query against a relatively large database (3 to 4 seconds delay) that repopulate a couple of datagrids, comboboxes...
4
by: Keith | last post by:
I have this simple scenario. -------- Choose an item ->dropdownlist-> or <a>Create a new item</a> -------- When someone decides to click on the create a new item link, it takes them to a...
7
by: Lastie | last post by:
Hi all, I’ve got a ‘dropdownlist’ web control and I can add ‘listitem’ no problem. I can also bind data from an SQL database fine. My problem is that I want to do both at the same...
10
by: Sacha Korell | last post by:
I'm trying to load a drop-down list with all DropDownList control names from another page. How would I be able to find those DropDownList controls? The FindControl method will only find a...
2
by: glenn | last post by:
Hi folks, I am trying to determine which item in a DropDownList Web control has been selected. I have posted an OnSelectedIndexChanged subroutine in my code with a reference to the subroutine...
0
by: lamolap | last post by:
i have 1 gridview , a dropdownlist inside a gridview and a commandfield of (edit, update and cancel) my gidview looks like this Edit Surname Initials ...
7
by: Cirene | last post by:
I have a dropdownlist. I want to fill it with times (using vb.net code). I want the entries in the ddl to be from "8:00 AM" to "5:00 PM", incrementing every half hour. I know I could type in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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...

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.