943,774 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 16056
  • ASP.NET RSS
May 8th, 2007
0

Populate One Drop Down List From Another

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
wonder_gal is offline Offline
10 posts
since Apr 2007
May 9th, 2007
0

Re: Populate One Drop Down List From Another

Do you know how to populate one combo?
If you don't i suggest that you read some tutorials before.
Reputation Points: 12
Solved Threads: 11
Junior Poster in Training
ManicCW is offline Offline
95 posts
since Nov 2005
May 9th, 2007
0

Re: Populate One Drop Down List From Another

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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
wonder_gal is offline Offline
10 posts
since Apr 2007
May 9th, 2007
0

Re: Populate One Drop Down List From Another

Well just populate second dropdown in SelectedIndexChanged event of the first dropdown.
Reputation Points: 12
Solved Threads: 11
Junior Poster in Training
ManicCW is offline Offline
95 posts
since Nov 2005
May 9th, 2007
0

Re: Populate One Drop Down List From Another

Click to Expand / Collapse  Quote originally posted by ManicCW ...
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
Reputation Points: 18
Solved Threads: 9
Junior Poster
w_3rabi is offline Offline
160 posts
since Dec 2006
May 10th, 2007
0

Re: Populate One Drop Down List From Another

Quote ...
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.
Reputation Points: 12
Solved Threads: 11
Junior Poster in Training
ManicCW is offline Offline
95 posts
since Nov 2005
May 10th, 2007
0

Re: Populate One Drop Down List From Another

surely
Reputation Points: 18
Solved Threads: 9
Junior Poster
w_3rabi is offline Offline
160 posts
since Dec 2006
Dec 21st, 2009
0
Re: Populate One Drop Down List From Another
I have four dropdownlist boxes Each contains 1,2,3.....7 subitems.
I have filled first dropdown in page_init event by using
Me.ddlPickupNoOfDays1.Items.Add("1") .......Me.ddlPickupNoOfDays1.Items.Add("7") Now I want to fill remaining 3 dropdownlist boxes with same values And I dont want to write the same code in page_init event how can I fill remaining 3 dropdowns using first If someone knows please help
Reputation Points: 10
Solved Threads: 0
Newbie Poster
madhurimca is offline Offline
1 posts
since Dec 2009
Dec 21st, 2009
0
Re: Populate One Drop Down List From Another
Why u using this long way, why dont you edit items in dropdownlist properties, much easier, you dont have to write any code.
Hope this helps,
Reputation Points: 10
Solved Threads: 1
Newbie Poster
giahmed is offline Offline
19 posts
since Dec 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: Inserting Record using ASP.net c# and Access Database
Next Thread in ASP.NET Forum Timeline: Thanks & Question





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC