468,738 Members | 1,653 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,738 developers. It's quick & easy.

Process dropdown lists on client side

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!
Nov 19 '05 #1
1 1450
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" <Ed****@discussions.microsoft.com> wrote in message
news:A3**********************************@microsof t.com...
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!

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Jim Mitchell | last post: by
32 posts views Thread by Continental Translations | last post: by
4 posts views Thread by Ian Davies | last post: by
3 posts views Thread by DaveF | last post: by
5 posts views Thread by John Grandy | last post: by
xarzu
2 posts views Thread by xarzu | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.