[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

How to auto populate a second dropdown list from a previous selection on the first dropdown list?

Posted on 2009-07-07
4
Medium Priority
?
471 Views
Last Modified: 2012-05-07
Im trying to create a form that will have several dropdown lists. When a user chooses and option on the first dropdown list, it will populate the second dropdown with options related to the selection on the first dropdown list. Im new to .net and I dont know how to go about it.
0
Comment
Question by:jhsit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 41

Expert Comment

by:guru_sami
ID: 24799031
Key is to use SelectedIndexChanged event on first DropDownList and appropriately binding the next DDL..
See this example:
http://www.aspsnippets.com/post/2009/06/13/Creating-Cascading-DropDownLists-in-ASPNet.aspx
0
 
LVL 21

Accepted Solution

by:
Tapan Pattanaik earned 2000 total points
ID: 24799057
hi jhsit,

           Use ASP.NET AJAX CascadingDropDown Control Extender. Check the below link which describes about that.

http://www.asp.net/AJAX/AjaxControlToolkit/Samples/CascadingDropDown/CascadingDropDown.aspx

Here is a video tutorial for AJAX CascadingDropDown Control Extender

http://www.asp.net/learn/ajax-videos/video-77.aspx

Thanks
0
 
LVL 8

Expert Comment

by:MrAgile
ID: 24799401
HI There,

I would try to steer away from using MS ajax in my applications if I were you. The library is massive and adds to much weight and code to your page.

What you need can be achieved using a javascript framework like (www.jquery.com). Here is a sample of dependant dropdowns that can be adapted to what you're doing.

http://www.ajaxray.com/blog/2007/11/08/jquery-controlled-dependent-or-cascading-select-list-2/ 

There are also more samples on the web or if need be I can help you with some basic code.

Sean
0
 

Author Closing Comment

by:jhsit
ID: 31602202
Awesome Website-- It was more than I was looking for.. thanks!!!
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question