Populating DropDownLists with AJAX - Beginner

Discussion in 'ASP .Net' started by 47computers@gmail.com, Mar 31, 2007.

  1. Guest

    I have a couple of DropDownLists in a DetailsView control (your
    classic country/state lists) and I need one to be populated based on
    the current selection of the other. Currently this works fine with a
    postback, but an AJAX solution would be a better way of doing things.

    I've been googling around for some examples and tutorials, but so far
    nothing is working. I'm really a beginner with AJAX and need a simple
    example or tutorial for doing specifically what I'm trying to do. I
    figure it's a common enough task that there should be something out
    there, but googling terms like "asp .net ajax dropdownlist" or a
    similar query returns about half the internet.

    Can anyone point me in the right direction, or offer some sample code
    that does this seemingly simple task? I'd really appreciate it,
    thanks.


    Regards,
    David
    , Mar 31, 2007
    #1
    1. Advertising

  2. Ben Rush Guest

    Hello,

    I can certainly give you examples to do databinding, but you may be able to
    accomplish the same task by simply putting the drop downlist within an
    UpdatePanel and refreshing that panel when someone makes a selection.

    See this:
    http://ajax.asp.net/docs/mref/M_Sys..._RegisterAsyncPostBackControl_1_62fe17e7.aspx

    --
    ~~~~~~~~~~~
    Ben Rush
    http://www.ben-rush.net/blog


    <> wrote in message
    news:...
    >I have a couple of DropDownLists in a DetailsView control (your
    > classic country/state lists) and I need one to be populated based on
    > the current selection of the other. Currently this works fine with a
    > postback, but an AJAX solution would be a better way of doing things.
    >
    > I've been googling around for some examples and tutorials, but so far
    > nothing is working. I'm really a beginner with AJAX and need a simple
    > example or tutorial for doing specifically what I'm trying to do. I
    > figure it's a common enough task that there should be something out
    > there, but googling terms like "asp .net ajax dropdownlist" or a
    > similar query returns about half the internet.
    >
    > Can anyone point me in the right direction, or offer some sample code
    > that does this seemingly simple task? I'd really appreciate it,
    > thanks.
    >
    >
    > Regards,
    > David
    >
    Ben Rush, Apr 1, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mr. T.
    Replies:
    1
    Views:
    327
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Jan 30, 2006
  2. Mr. T.
    Replies:
    0
    Views:
    308
    Mr. T.
    Jan 30, 2006
  3. darrel

    beginner AJAX questions (AJAX.net)

    darrel, Apr 27, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    2,436
    Flinky Wisty Pomm
    Apr 28, 2006
  4. Don Miller
    Replies:
    0
    Views:
    389
    Don Miller
    Jan 23, 2007
  5. Komalid
    Replies:
    0
    Views:
    377
    Komalid
    Jan 28, 2008
Loading...

Share This Page