DropDownList depending on DropDownList

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jonathan

    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=Tr ue so that my 2nd dropdownlist is refreshed with it's
    content when the SelectedIndexCh anged 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
  • Paul Clement

    #2
    Re: DropDownList depending on DropDownList

    On Fri, 29 Oct 2004 20:45:10 GMT, Jonathan <aaa@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=Tr ue so that my 2nd dropdownlist is refreshed with it's
    ¤ content when the SelectedIndexCh anged 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 ~~~ pclement@amerit ech.net
    Microsoft MVP (Visual Basic)

    Comment

    Working...