473,466 Members | 1,562 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

DropDownList depending on DropDownList

Hi everyone,
i have made two dropdownlist controls. On my first one, i have the country
and on the second one, the state (for example) if i selected the United
States country. So depending on wich country i selected in my first
dropdownlist control, i load my information in my second dropdownlist.

How i did this is by setting my first dropdownlist (country) to
AutoPostBack=True so that my 2nd dropdownlist is refreshed with it's
content when the SelectedIndexChanged event is fired.

My problem is that my browser refreshes each time to load the second
dropdownlist depending on what choice i made on my first dropdownlist
control.

So I was thinking that there must be a way (in Asp.Net) to load
automatically (without browser's refresh) my second dropdownlist. I know i
could possibly do that in javascript but i want to make it in .Net (if
possible). I am using vb in my aspx files.

Any help, tips, informations, sites, articles is greatly appreciated

Thanks in advance!

Jonathan
Jul 21 '05 #1
1 1285
On Fri, 29 Oct 2004 20:45:10 GMT, Jonathan <aa*@aaa.com> wrote:

¤ Hi everyone,
¤ i have made two dropdownlist controls. On my first one, i have the country
¤ and on the second one, the state (for example) if i selected the United
¤ States country. So depending on wich country i selected in my first
¤ dropdownlist control, i load my information in my second dropdownlist.
¤
¤ How i did this is by setting my first dropdownlist (country) to
¤ AutoPostBack=True so that my 2nd dropdownlist is refreshed with it's
¤ content when the SelectedIndexChanged event is fired.
¤
¤ My problem is that my browser refreshes each time to load the second
¤ dropdownlist depending on what choice i made on my first dropdownlist
¤ control.
¤
¤ So I was thinking that there must be a way (in Asp.Net) to load
¤ automatically (without browser's refresh) my second dropdownlist. I know i
¤ could possibly do that in javascript but i want to make it in .Net (if
¤ possible). I am using vb in my aspx files.
¤
¤ Any help, tips, informations, sites, articles is greatly appreciated
¤

The server controls require a trip to the server. If you want to eliminate the trip to the server
then you'll have to use the HTML controls and JavaScript.
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Yahya Saad | last post by:
Dear All, I have an ASP.Net webform that includes a DropDownList (bound to a dataview including 6000 records) and a textbox that is updated according to the selection of an event at the...
2
by: Jennyfer J Barco | last post by:
Hello is there a way to create a dropdownlist inside a <input type='dropdownlist'> or there is an equivalent to create other than <asp:DropDownList id="drop1" runat="server"> . I need this because...
3
by: Olivier Verdin | last post by:
Hi, I have a page with several Textboxes and several DropDownList. When I click on a 'save' button, it creates a record in a database. The page works fine under Internet Explorer. It does...
0
by: Tand35006 | last post by:
Hi, I hope some one can help with this. I have a basic webform with 2 DropDownLists and a single DataGrid. What I am trying to do is populate the first DDList from a dataset on Form_Load. I then...
1
by: Jonathan | last post by:
Hi everyone, i have made two dropdownlist controls. On my first one, i have the country and on the second one, the state (for example) if i selected the United States country. So depending on wich...
0
by: brian.newman | last post by:
I've created a dropdownlist whose values are drawn from an Access database. This list of items represents a user account. In the same record is a boolean field which records whether the user is...
3
by: =?Utf-8?B?RGVlcGE=?= | last post by:
Hi All, I have a webform in asp.net framework 1.1 where the dropdownlist is populated with list of locations from the database. The depending on the list selected, the user will be able to see...
5
by: =?Utf-8?B?Q2hyaXMgRy4=?= | last post by:
I'm trying to put conditional code in a dropdown that would check the value of the current ListItem and set Selected=true depending on that value, and Selected=false if it's any other value. Due...
11
by: harold.gimenez | last post by:
Hi group, I am trying to change the selection of an ASP Dropdownlist just like "Orange" is selected here: http://www.w3schools.com/js/tryit.asp?filename=try_dom_option_selected The...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...
1
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.