Process dropdown lists on client side

Discussion in 'ASP .Net' started by =?Utf-8?B?RWQgQ2hpdQ==?=, Aug 2, 2005.

  1. Hi,

    I have 2 dropdown lists on an ASP.Net page, the first is a list of states of
    US, the second is City list. When user selects a state, the web page does a
    postback, create a DB connection and bind a dataset to city dropdown list.
    This is working for me.

    But I would like to do this on the client side for the following reasons:
    (1) Doing this on server side takes time, the postback and connecting to DB
    costs too much.
    (2) Screen flickers and will not stay in the same position during postback.
    Imagine this is a bit lengthy page, and the drop down lists are in the
    middle of the page, user has to do some scrolliing. I don't want to use smart
    navigation, it's buggy.

    Please help!
     
    =?Utf-8?B?RWQgQ2hpdQ==?=, Aug 2, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?RWQgQ2hpdQ==?=

    Lars Netzel Guest

    It's pretty easy if you are familiar with JavaScript.

    This can be done by rendering a javascrit array in the code behind and place
    that somewhere in the HTML code and then in the onload() event of the body
    element loop thru the array and load the proper things in the proper
    dropdownlists...

    I have the code for it (a four dropdownboxes solution) but if you are not
    familiar with javascript it's not gonna be easy to explain this. In the end
    I had a 4-dimentional Javascript array to play with:)

    /Lars


    "Ed Chiu" <> wrote in message
    news:...
    > Hi,
    >
    > I have 2 dropdown lists on an ASP.Net page, the first is a list of states
    > of
    > US, the second is City list. When user selects a state, the web page does
    > a
    > postback, create a DB connection and bind a dataset to city dropdown list.
    > This is working for me.
    >
    > But I would like to do this on the client side for the following reasons:
    > (1) Doing this on server side takes time, the postback and connecting to
    > DB
    > costs too much.
    > (2) Screen flickers and will not stay in the same position during
    > postback.
    > Imagine this is a bit lengthy page, and the drop down lists are in the
    > middle of the page, user has to do some scrolliing. I don't want to use
    > smart
    > navigation, it's buggy.
    >
    > Please help!
     
    Lars Netzel, Aug 2, 2005
    #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. Joey
    Replies:
    1
    Views:
    818
    =?Utf-8?B?aGVpbg==?=
    Jan 3, 2006
  2. =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==

    List of lists of lists of lists...

    =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==, May 8, 2006, in forum: Python
    Replies:
    5
    Views:
    448
    =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==
    May 15, 2006
  3. Boss302
    Replies:
    0
    Views:
    1,107
    Boss302
    Nov 21, 2006
  4. Bogdan
    Replies:
    2
    Views:
    687
    Bogdan
    Jun 9, 2008
  5. AB
    Replies:
    3
    Views:
    242
Loading...

Share This Page