473,407 Members | 2,598 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,407 software developers and data experts.

How to cascade dropdown list boxes in ASP.NET

I am working on a web application in ASP.NET(uses C# language) that consist of using cascading dropdown listboxes. Bascially, after the one item is selected out of the listbox, the next one should automatically display its drop down list. Could someone please help.
Aug 4 '06 #1
3 23208
axas
32
(C#)
Expand|Select|Wrap|Line Numbers
  1. DropDownList1_SelectedIndexChanged(object sender, DropDownListCommandEventArgs e)
  2. {
  3.     // here load the other dropdownlist items
  4. }
(VB.NET)
Expand|Select|Wrap|Line Numbers
  1. Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As DropDownListCommandEventArgs) Handles DropDownList1.SelectedIndexChanged 
  2.  
  3.    'here load the other dropdownlist items
  4. End Sub
Aug 4 '06 #2
nmsreddi
366 256MB
hi

for cascading the combo boxes first set the combo box property autopost back=true and then what ever the combos u want to cascade, write the second combo databind code in combo selected indexchange() ,i.e u can write code in what u get by doubleclicking the particular combobox.


hope u got it and may useful



nmsreddi
Aug 9 '06 #3
I am working on a web application in ASP.NET(uses C# language) that consist of using cascading dropdown listboxes. Bascially, after the one item is selected out of the listbox, the next one should automatically display its drop down list. Could someone please help.
Hi..
I'm working on a web application in ASP.Net(delphi language) that consists of loading the items to the dropdown list box in the form load event... then if any other event(say button click) is triggered the form load event is automatically called and so the item that i have selected before my event(button click) is changed because the form load event is agained called and so the item in the dropdown list is the first item (itam at form load). So i can't get the query to my selected item instead i'm always getting the query for the first item of the drop downlist box.Hope u people understood my problem.. and do help me i fu know the answer..
Nov 3 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

33
by: Lee C. | last post by:
I'm finding this to be extremely difficult to set up. I understand that Access won't manage the primary key and the cascade updates for a table. Fine. I tried changing the PK type to number and...
2
by: ahoodless | last post by:
hi i have a problem that I have tried desperately to tackle but cannot seem to complete. basically i am trying to create a form with three dropdown lists, the tricky part is i want the 3rd drop...
6
by: Mark | last post by:
I have two dropdown lists. Both have autopostback set to true. In both dropdowns, when you select an item from the list, it redirects to the Value property of the dropdown. Nothing fancy. ...
1
by: Jack | last post by:
Hello, I have a dropdown list on a user control and the AutoPostBack property is set to True. I want to use the SelectedIndexChanged event to populate some text boxes based on what the user...
6
by: | last post by:
Do you have to use AutoPostBack to read the selected value in a dropdown list? I have an asp.net dropdown on a form. I'm filling it from a table when the page loads and want to read the value the...
1
by: cgian31 | last post by:
I have implemented a website where in a page are represented the data of one record, using cascade dropdown lists in 2 levels, within the same page/record. According to the selection in the...
9
by: Marianne160 | last post by:
Hi, I know there are various answers to this problem available on the web but none of them seem to work for me. I am using Access 2003 to make a form to look up data from a table. I have so far...
8
by: Wingot | last post by:
Hey, I have a program I am trying to write using Visual C#, SQL Server 2005/2008, and Visual Studio 2008, and one part of it includes a Schema called Client. Inside this schema, three tables...
6
by: yltang | last post by:
I am working on an order system. The following are the tables and forms. (A) Tables: tblOrder: OrderID (PK), CustomerID tblOrderDetail: OrderID (PK), ProductID tblProduct: ProductID (PK),...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.