User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 456,196 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,924 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 6669 | Replies: 6
Reply
Join Date: Apr 2007
Posts: 10
Reputation: wonder_gal is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
wonder_gal wonder_gal is offline Offline
Newbie Poster

Populate One Drop Down List From Another

  #1  
May 8th, 2007
Hi,

I have 2 drop down lists, in which the selection value of the 1st drop down list will determine the content of the second drop down list.
Is that I need to use javascript function to achieve this? If yes, how should I code the javascript and how should I call the javascript from within Page_Load, can someone please kindly show me an example?
Tour advice is much appreciated. Thanks.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2005
Location: Mostar
Posts: 89
Reputation: ManicCW is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 10
ManicCW's Avatar
ManicCW ManicCW is offline Offline
Junior Poster in Training

Re: Populate One Drop Down List From Another

  #2  
May 9th, 2007
Do you know how to populate one combo?
If you don't i suggest that you read some tutorials before.
Reply With Quote  
Join Date: Apr 2007
Posts: 10
Reputation: wonder_gal is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
wonder_gal wonder_gal is offline Offline
Newbie Poster

Re: Populate One Drop Down List From Another

  #3  
May 9th, 2007
Ya of course I knew about populating one combo. My question here is how to populate the SECOND drop down list upon changes of selected value in the FIRST drop down list.
Reply With Quote  
Join Date: Nov 2005
Location: Mostar
Posts: 89
Reputation: ManicCW is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 10
ManicCW's Avatar
ManicCW ManicCW is offline Offline
Junior Poster in Training

Re: Populate One Drop Down List From Another

  #4  
May 9th, 2007
Well just populate second dropdown in SelectedIndexChanged event of the first dropdown.
Reply With Quote  
Join Date: Dec 2006
Location: syria
Posts: 158
Reputation: w_3rabi is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 8
w_3rabi's Avatar
w_3rabi w_3rabi is offline Offline
Junior Poster

Re: Populate One Drop Down List From Another

  #5  
May 9th, 2007
Originally Posted by ManicCW View Post
Well just populate second dropdown in SelectedIndexChanged event of the first dropdown.

then the page will go back to server to populate the dropdown list
i guess using AJAX is more efficient
programming is an art ,only for those who can understand it.
- th3 php wr3nch -
Reply With Quote  
Join Date: Nov 2005
Location: Mostar
Posts: 89
Reputation: ManicCW is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 10
ManicCW's Avatar
ManicCW ManicCW is offline Offline
Junior Poster in Training

Re: Populate One Drop Down List From Another

  #6  
May 10th, 2007
then the page will go back to server to populate the dropdown list
i guess using AJAX is more efficient

Sure it is.
But if she does not know how to populate this way it's going to be harder for her to do it ajax way.
Reply With Quote  
Join Date: Dec 2006
Location: syria
Posts: 158
Reputation: w_3rabi is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 8
w_3rabi's Avatar
w_3rabi w_3rabi is offline Offline
Junior Poster

Re: Populate One Drop Down List From Another

  #7  
May 10th, 2007
surely
programming is an art ,only for those who can understand it.
- th3 php wr3nch -
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 3:48 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC