Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 7th, 2004, 09:13 PM
Registered User
 
Join Date: Sep 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default dropdown lists

I am trying to put two dropdown lists on a page just by using ASP.Net(VB) How can I accomplish this so that the content of the second dropdown list is controlled by the first? ideally I'd like to populate the first and second one using a web control attached to an Access db; when the SelectedIndexChanged event fires, I'd like the select command that the second web control (for the second dropdown list) to be changed based upon the first selection (so that the second list's contents change upon changing the contents of the first).

 
Old September 8th, 2004, 07:29 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Will the 2nd ddl have anything at the start?

In your event handler once you have the change for ddl then call a sub that populates the 2nd ddl based on the selected item.

 
Old September 8th, 2004, 12:34 PM
Registered User
 
Join Date: Sep 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The second ddl will have nothing at start. I am using ASP.NET WebMatrix. Should that cause problems if I am trying to accomplish this?

So basically I have the SelectedIndexChanged event for the first list call a second sub which then does the DataBind() for the second DropDown list? Where should I attempt to define the Select Command for the second web control (before it does a DataBind()?) Thanks a lot.

 
Old September 8th, 2004, 02:45 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

You can even allow the SelectedIndexChanged Event bind the 2nd ddl. You would bind it just like the 1st ddl and make the necessary modifications based off the 1st ddl's selected value.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Regarding DropDown Lists in Asp.Net venkat_vitala ASP.NET 1.0 and 1.1 Basics 1 January 17th, 2007 09:16 AM
Linked Dropdown Lists contagiouss_blue Beginning VB 6 1 June 8th, 2005 10:35 AM
Page Linking though DropDown Lists mahulda ASP.NET 1.0 and 1.1 Basics 2 April 23rd, 2004 02:58 PM
dependent dropdown lists vivshah VS.NET 2002/2003 1 March 29th, 2004 05:25 PM
2 tables and 2 dropdown lists collie Classic ASP Databases 0 October 20th, 2003 07:20 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.