473,401 Members | 2,068 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,401 software developers and data experts.

Populating DropDownLists with AJAX - Beginner

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 '07 #1
1 1551
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_Syst..._62fe17e7.aspx

--
~~~~~~~~~~~
Ben Rush
http://www.ben-rush.net/blog
<47*********@gmail.comwrote in message
news:11**********************@l77g2000hsb.googlegr oups.com...
>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

Apr 1 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: enigma261 | last post by:
Hi, I am a XML beginner. I need some guidance in intrepreting a XML file and then populating my object model. Following is an example of the XML file .. <Tom> <Version>x.0</Version>
1
by: Wim | last post by:
Hi Everyone, I'm trying to speed up a Asp.net 1.1 applications' performance. The application needs to run in an environment with little bandwith and therefore pagesizes and roundtrip times shoud...
3
by: RFS666 | last post by:
Hello together, I tried to find out about populating an asp.net server control (a dropdownlist) from the clientside jscript, but I didn't find a solution up to now. I cannot use a html...
5
by: darrel | last post by:
I've been playing with prototype.js and scriptaculous to create some nice drag-and-drop interaction on my applications GUI. That's working well. Now I want to take the next step and start passing...
4
by: Nathan Sokalski | last post by:
I am a beginner with AJAX, and have managed to learn how to use it when passing single parameters, but I want to return more than one value to the client-side JavaScript function that displays it....
6
by: Rob Meade | last post by:
Hi all, Looking for a bit of help if possible. For about 2 weeks now I've been investigating the best way to populate related drop down menus, and have their values pre-populated again if the...
12
by: Justn226 | last post by:
hi, I am a beginner with AJAX, i have an assignment where I have to pass a number to my php script and have it sent back converted into CELCIUS OR FARENHEIHT(spelled wrong). The problem is I dont...
1
by: klaul | last post by:
I've been trying to do this for a day and a half now, and am clearly getting nowhere! The database I'm using is used to keep a log of service calls to various companies. When the user inserts data,...
2
by: malcster2 | last post by:
hello, i am a beginner to ajax. i have created a mysql database, which i would like to access from a web page. i have created 3 files, a html to display the data, a php file to extract the data,...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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.