473,407 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

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 1549
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jim Mitchell | last post by:
My Goal is to have a dropdown (DL2) filled from the selectIndexChange event of a primary dropdown (DL1). These are picklists that will be selected frequently. Can someone recommend a strategy...
32
by: Continental Translations | last post by:
Can anybody help me? I am trying to create two drop down menus, where the results of the second one vary depending on what was selected in the first one. I am using MS Script Editor in MS Front...
4
by: Ian Davies | last post by:
Hello I have two drop down menus in my php script. The items displayed in the second is dependent on which item is choosen from the first i.e. the choosen item from the first filters the items in...
2
by: Chris Becker | last post by:
This is my attempt to rephrase a question I asked earlier that got no response. I suspect it was my poor/unplanned wording. Here is another attempt: I have a form with some drop down lists. I...
6
by: Paul | last post by:
I am trying to setup a field validator and tried using the control to validate set to a dropdown list box but did not seem to work. Is there anyway to set this up or do you need to use client side...
6
by: Mark | last post by:
I have two dropdown lists. Both have autopostback set to true. In both dropdowns, when you select an item from the list, it redirects to the Value property of the dropdown. Nothing fancy. ...
3
by: DaveF | last post by:
I need to capture a selected value of the onchange dropdown and put it in a textbox??? -- Dave
5
by: John Grandy | last post by:
I wrote a function to populate my dropdowns on the client-side. The function adds <optionelements to the <selectonly if none are initially present. I call the population function from either...
1
by: AB | last post by:
I am creating a ASP.Net 1.1 (VB) web. I have 2 drop down lists which are independent of each other. Both are filled from a database on the pageload. There is also a search button which searches the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.