Populating a DropDownList using AJAX and ASP.NET
page 1 of 5
Published: 06 Sep 2005
Abstract
AJAX is the latest buzzword in the web development industry. But what is it, and how can you use it? Ramaprasad Potturi and Sanjay Patnaik explain the technology and provide a real-world example of a web page that presents a country and state pair of drop-down lists, where the state drop-down list is populated dynamically on the client side, removing the need for the page to post back to the server.
by Ramaprasad Potturi
Feedback
Average Rating: 
Views (Total / Last 10 Days): 189494/ 2826

Introduction

In the first section of this article, we shall introduce AJAX and discuss its advantages and disadvantages. Next, we look at the XMLHTTPRequest object, its properties and functions, and how to create an instance of this object. Then, we will illustrate the use of AJAX functionality by creating a sample application. Finally, we will talk about how the sample application works. The sample application is an ASP.NET web application, written in C#, and is available for download.


View Entire Article

Article Feedback

Title:  
Name:  
Url: ( Optional )
Comment:  
Please add 6 and 4 and type the answer here:

User Comments

Title: Hai   
Name: Abhishek
Date: 5/2/2008 6:13:47 AM
Comment:
Nice example
Title: fghgfhf   
Name: fghfh
Date: 5/2/2008 1:09:59 AM
Comment:
nvnvnv
Title: Superp Article   
Name: Ilayaraja
Date: 5/2/2008 12:58:55 AM
Comment:
This article is good.
Title: simple and nice   
Name: AB
Date: 5/1/2008 3:29:05 AM
Comment:
nice and clear
Title: AJAX and JAVA script problem   
Name: Developer
Date: 4/25/2008 12:31:02 AM
Comment:
Populating the dropdown using AJAX (XMLHTTP)is working well in my Web page but in the same page i have a link (Link Button).On click of the link button a confirm box pops up .If OK is clicked it redirects to anohter page.This works fine in all other page but in AJAX page alone the control is not going into server side event.It throws up "Invalid Syntax" in status bar.Please help as i am new to AJAX
Title: AJAX   
Name: ANIL
Date: 4/17/2008 7:13:59 AM
Comment:
hi
write now i am developing a web application in which i have to populate two dropdownlist
for example i want to populate first dropdownlist with country list and if we select any country from 1st dropdownlist then it should place all the states in the second dropdownlist and if we select any state from the second dropdownlist then it should give the capitals in the textbox beside that
please solve my problem its very urgent
you can mail me at aniljadhav15@rediffmail.com
Title: sdf   
Name: sdf
Date: 4/15/2008 1:00:46 PM
Comment:
adf
Title: hgjyhj   
Name: ffgfgf
Date: 4/15/2008 10:30:10 AM
Comment:
sfrfd
Title: shoaibkh   
Name: shoaib
Date: 4/9/2008 2:34:24 PM
Comment:
I really want to learn ajax for implementing it in a .net
Title: dropdown list   
Name: anu
Date: 4/4/2008 5:51:30 AM
Comment:
database retrive the value of dropdown list is selected the item display the another text box
Title: Give more easier method   
Name: Biswanath
Date: 3/31/2008 12:03:00 AM
Comment:
Give more easier method using javascript.
This is waste really becoz we don't have time to
put all state & corresponding cities. So make it more user
friendly by adding JS.
Title: dropdown   
Name: Sathish
Date: 3/26/2008 12:24:48 AM
Comment:
the value selecting on dropdownlist, should dispaly in pariticular textbox.. pls give the coding
Title: Props   
Name: newbie2vb.net
Date: 3/15/2008 3:19:43 PM
Comment:
Great article. Great example
Title: good one   
Name: kathu
Date: 3/11/2008 5:59:17 AM
Comment:
this is actally a good example...
Title: nice one   
Name: mike
Date: 3/6/2008 12:36:06 PM
Comment:
good example
Title: ajax   
Name: sukhdeep
Date: 3/2/2008 2:04:50 AM
Comment:
nice article it helps very much in my project
Title: good   
Name: cheten
Date: 2/26/2008 5:11:03 AM
Comment:
hi
this is nice article about ajax control.
Title: Thanking   
Name: Nethaji
Date: 2/21/2008 8:38:09 AM
Comment:
Its Excellently working , Realy its very useful for me,
I need to display the value from database using dropdown
Title: First time i like very much   
Name: pavan kumar
Date: 2/21/2008 4:00:27 AM
Comment:
this sample application is very nice.is is given by very clearly.thank u a lot.pls keep doing like this
Title: Interesting   
Name: Adam
Date: 2/17/2008 9:37:18 AM
Comment:
nice to learn ajax but I wanted it in VB language and not C.
Title: About Modal Popup   
Name: abhay
Date: 2/15/2008 7:32:37 AM
Comment:
hi
i m using modal popup. when my popup open, and click on ok then i want to go on next page. pls send code urgent.
Title: no words to say   
Name: allen
Date: 2/15/2008 6:53:00 AM
Comment:
this article was published in 2005, but i find it in 2008.
so bad
Title: great   
Name: Manish
Date: 2/14/2008 9:05:54 AM
Comment:
thanks man, for guiding on AJAX , nice
Title: nice   
Name: Puja
Date: 2/6/2008 4:44:43 AM
Comment:
nice article
puja
http://mindgrillq.blogspot.com
http://www.shopperixmall.com
Title: Good Example   
Name: Nitin Tiwari
Date: 1/21/2008 8:15:27 AM
Comment:
ya...really,,it is best example..h t
Title: Studing Ajay   
Name: Indravijay
Date: 1/9/2008 2:23:19 AM
Comment:
i was just learning how i will create my first Ajax Test page... this example make me understand of basic working of ajax... this is eraly good Approch for making new comer to learn new
Title: AJAX With ASP.NET   
Name: sekar.j
Date: 1/7/2008 7:54:16 AM
Comment:
thank u i learn more technique for ur book
Title: AJAX   
Name: Vipul
Date: 1/6/2008 1:37:30 PM
Comment:
good topic to understand AJAX technology
Title: asp.net with c#   
Name: karthick
Date: 1/2/2008 6:27:57 AM
Comment:
i want to know how to retrieve particular datafield from database using dropdownlist box pls urgent give me coding
Title: dropdownlist   
Name: arun
Date: 12/28/2007 7:45:10 AM
Comment:
plz tell me the codings.... if a item in dropdownlist is clicked another item in db should display in another dropdownlist in asp.net
Title: dropdownlist   
Name: chand
Date: 12/28/2007 7:43:40 AM
Comment:
if a item in dropdownlist is clicked another item in db should display in another dropdownlist in asp.net
Title: Pupulate two dropdown list   
Name: nitikeni
Date: 12/17/2007 4:42:00 AM
Comment:
I'm very charmed with it.
this is very cool, very handy for those guys whoever new in the ajax world.

it's very managed and understandable.keep posting that kind of sample which give some idea to learn AJAX.
Title: Pupulate two dropdown list   
Name: Avinash Pohane
Date: 12/7/2007 6:58:57 AM
Comment:
This article is in simplified way and handy.Thnk u very much.Please post more articles related to AJAX with ASP.NET which should come across in real time.Please provide full code in the tutorial.
Title: populate two dropdownlist   
Name: raghu
Date: 11/29/2007 6:43:22 AM
Comment:
hi
write now i am developing a web application in which i have to populate two dropdownlist
for example i want to populate first dropdownlist with country list and if we select any country from 1st dropdownlist then it should place all the states in the second dropdownlist and if we select any state from the second dropdownlist then it should give the capitals in the textbox beside that
please solve my problem its very urgent
you can mail me at p.raghu@yahoo.co.in
Title: using ajax in asp.net 2.0   
Name: sandeep sindwani
Date: 11/26/2007 4:27:47 AM
Comment:
currently m learning asp.net,ajax and xml. so please send me more and more samples and code of this subject.

my emailid is-sandeep_mca22@yahoo.co.in
Title: I could not get xmlhttp object   
Name: Joseph
Date: 11/16/2007 6:44:35 AM
Comment:
hpw to get the xmlhttp object and give me the and ClearAndSetStateListItems()
Title: Bind DataGrid   
Name: manuj
Date: 11/13/2007 11:33:48 PM
Comment:
How can i bind datagrid using xmlhttp object and web service.
Web method returns dataset.
Title: Populating a textbox   
Name: sara
Date: 11/5/2007 7:44:11 AM
Comment:
I am selecting one of the option from combo box n i want to show that selected value in text box using asp/vbscript.
I am not getting the property of select tag of html so tht i can read the value of combo box
My mail id is saraswati.panchakshari@gmail.com
Title: My mail ID   
Name: Archana Pataskar
Date: 10/29/2007 7:15:37 AM
Comment:
HI,
Here is my mail id:- archanapataskar@gmail.com. You can answer me on above ID.
Title: Regarding the XPathDocument   
Name: Archana Pataskar
Date: 10/29/2007 7:13:29 AM
Comment:
Hi,
I could not understand the use of XPathDocument here. Can't we use XMLDocument instead? Does it really matter? what is the impact of using XPathDocument in this? What is the difference between XPathDocument and XMLDocument?
Title: Populating a textbox   
Name: Eric C.
Date: 10/25/2007 5:22:58 PM
Comment:
I am trying to use a selection of a drop down list to populate the appropriate text fields from a database. The selection is a user and it needs to populate the user's appropriate phone and email fields. I am coding in VB.NET and any suggestions would be appreciated.

My email is: collins101@gmail.com
Title: Wel done   
Name: Archana Pataskar
Date: 10/24/2007 9:25:58 AM
Comment:
Such an interesting and informative topic!
Title: Find Datavalue fiels in dropdown list   
Name: Madhavi DAkhani
Date: 10/23/2007 3:05:08 AM
Comment:
Hello sir,
I am make a datalist and in i have taken one dropdown list and one text area so how to find which dropdown is selected and what is write in text area.
plz give answer thankx in advance.

my email-id is:

madhavidakhani@gmail.com
Title: binding the dropdown without postback   
Name: Yunus
Date: 10/19/2007 2:01:30 AM
Comment:
I am new to ajax pls send me the code to use ajax in binding the dropdown so that without postback occurs
Title: trying to populate listbox from datagrid   
Name: pranathi
Date: 10/18/2007 8:43:59 AM
Comment:
Hi
I am trying to place the checked checkboxes of datagrid to listbox using ajax

plz help me
mail id: pranathi27@yahoo.co.in
Thanks in advance
Title: How to use Ajax to bind the drop-down in asp.net   
Name: sanjeev
Date: 10/16/2007 3:25:56 AM
Comment:
Hi,
Sir I am new to ajax pls send me the code to use ajax in binding the dropdown so that no postback occurs.
Regards
sanjeev
sanjeev_mca1234@rediffmail.com
Title: ramoji999@gmail.com   
Name: ramoji
Date: 10/15/2007 7:26:49 AM
Comment:
Sorry i forgot to give my Email Id :
it is ramoji999@gmail.com
Title: Want a similar example with database   
Name: Ramoji
Date: 10/15/2007 7:00:30 AM
Comment:
Hi
The example was so good, but i have an issue that i need to fetch the data from data base not from xml file my function returns a data table and i need the output of data table as items in child drop down
Pls help me in this ASAP
Title: java   
Name: david
Date: 10/13/2007 4:17:22 PM
Comment:
hai ... i am new to enter java
Title: Como lleno un combo con ajax??   
Name: Javier Rodriguez
Date: 10/11/2007 1:18:01 PM
Comment:
Solo quiero ver un ejemplo de codigo en ASP.NET como llenar un combo con AJAX,Yo Lo puedo hacer con PHP.

Mi Correo es Jaxier.Rod@Gmail.com
Title: plz help me   
Name: Mala
Date: 10/11/2007 1:00:34 AM
Comment:
hello ,

i am using drop down for country , state and city , plz tell me how can i make this in asp.net 2005 using c# by ajax
Title: Help!Help!Help   
Name: Babita
Date: 9/25/2007 6:09:48 AM
Comment:
hello sir,i m very new to AJAX. plz ans this........
How to get state value in my variable which i am using in code behind file ( Ex: string str=selectstate.selecteditem.text; )
how i get value in my local string. plz plz ans this: and one thing which is not yet clear that when we post back the page it's comes in intial mode i mean combo comes in first mode that is india state.
why.......... can u ans me plz......
Plz help. it's very urgent. Thanx in advance
My email address is: babitamca07@gmail.com
Title: akax   
Name: venkat
Date: 9/25/2007 12:30:40 AM
Comment:
Hi
this is very good and simple article about AJAX.But how can i use cache to a textbox as like in google.
if we enter text in textbox it will display all rellated which had been typed by user in previous
Title: BRAVO   
Name: Sachin Dubey
Date: 9/24/2007 3:30:13 AM
Comment:
Hi
this is very good and simple article about AJAX.But how can i use cache to a textbox as like in google.
if we enter text in textbox it will display all rellated which had been typed by user in previous
Title: ajax   
Name: Pawan
Date: 9/21/2007 7:41:08 PM
Comment:
Thanks for using ajax.......
Title: Bind Second Drop Down from Database on change of first one   
Name: ssrconstantine
Date: 8/31/2007 11:16:55 AM
Comment:
this is nice article but i want to bind Second DropDown from selected value of first drop down not from XML.
Title: Thanks   
Name: Aravind B.s
Date: 8/30/2007 8:23:53 AM
Comment:
Hi
this is very good and simple article about AJAX.But how can i use cache to a textbox as like in google.
if we enter text in textbox it will display all rellated which had been typed by user in previous.

arv_bs@yahoo.co.in
Title: Thanks   
Name: narendrasinh
Date: 8/29/2007 8:15:30 AM
Comment:
this is vary god and help ful to us so ones more thanks again and
Title: Problem with View state   
Name: Murali Dharan
Date: 8/23/2007 9:07:37 AM
Comment:
Hi,
This post is really good...I have a doubt.When you bind the data into the drop down list in client side and if we are posting the page back to the server say by a click of a button then the Selected value of the particular Drop down list can't be captured.Is there any way to capture the value of the ddl's selected data
Title: Mr   
Name: Mohammad
Date: 8/19/2007 1:19:50 PM
Comment:
Very wel done Ramaprasad. This the best artical i ever come across. Keep up the good work.
Title: ajax tutorial   
Name: ganesh shankar
Date: 8/13/2007 5:01:51 AM
Comment:
very fine topic
Title: Best article   
Name: Rajeev kumar
Date: 8/8/2007 2:25:36 AM
Comment:
This is best article.
Thanls a lot
Rajeev
Title: excelent article   
Name: sairam sadanala
Date: 8/2/2007 6:23:52 AM
Comment:
nice one
Title: sanjay   
Name: good work
Date: 7/25/2007 11:52:05 PM
Comment:
I am not too sure how to instantiate the XML in this case? Coz i dont see it as a class? Could someone help?
Title: CountryStateXml class   
Name: Gene Rajska
Date: 7/25/2007 2:40:00 PM
Comment:
To sandeep.

If you download the code sample, you will find the class.
The program works if you open it using a browser.
The problem is how to increase the dropdownlist from two to three or four.

Gene.
Title: the CountryStateXml class is not mentioned anywhere   
Name: sandeep
Date: 7/24/2007 7:12:46 AM
Comment:
the CountryStateXml class is not defined anywhere and the methods used in it are also not defined anywhere....
Title: BEST I HAV SEEN ...THANX ALOTTT!!!   
Name: sandeep
Date: 7/23/2007 8:30:24 AM
Comment:
hey my sincere thanx to for posting this article to Mr.ramaprasad potturi & Mr.Sanjay Patnaik
Title: Web Developer   
Name: Gene Rajska
Date: 7/17/2007 10:42:16 AM
Comment:
Is it possible to have 4 dropdownlists? 1 for world regions, 1 for country list or each region, 1 for state lists for each country and 1 for cities for each state.
If there are no states, then the country becomes the state. And some states have only 1 city, like Singapore and Vatican.
Anybody who can do it may email me at rajska7@gmail.com.
Thanks
Title: very good   
Name: jitendra
Date: 7/17/2007 6:17:39 AM
Comment:
very good
Title: very good   
Name: kumar
Date: 7/11/2007 8:18:54 AM
Comment:
it is good example for beginners
Title: Thanks   
Name: Brijesh Singh
Date: 7/11/2007 1:08:15 AM
Comment:
It is nice example but i want to use ms access table rather than xml file to access the Country and States,then what changes/code i have to make.Can u plz have any....idea.

Brijesh Singh
email:brijesh@cybersoftdesigns.com
Title: Thanks   
Name: Ratnesh kumar Verma
Date: 7/10/2007 9:27:26 AM
Comment:
Nice job i find my solution but one thing which is not yet clear that when we post back the page it's comes in intial mode i mean combo comes in first mode that is india state.
why.......... can u ans me plz......
my Email id is meetratnesh@gmail.com.
Title: Ajax combo   
Name: Ratnesh Kumar Verma
Date: 7/10/2007 8:15:48 AM
Comment:
hello sir plz ans this........
How to get state value in my variable which i am using in code behind file ( Ex: string str=selectstate.text; )
how i get value in my local string. plz plz ans this:
My email address is: meetratnesh@gmail.com
Title: software engineer   
Name: suneel singh
Date: 7/10/2007 7:37:36 AM
Comment:
very interesting and well notes for AJAX technology.... I really need CountriesAndStates.xml asap.

My email id is: cse.suneel@gmail.com
Title: Doubt   
Name: Sri
Date: 7/9/2007 3:49:39 AM
Comment:
Am doing how u r explained in teh above article. My requirement is when i was select teh dropdown that text has to display in the Textbox. in the debuggging am getting teh value but its not bing to the textBox plz solve my problem.

and one more thing is am useing one aspx page and one Js page.In the above ex u r using 2 aspx pages one for clent side and another for sever side. Is there any special use for tat? otherwise u r using for ur convinience. Plz give me teh reply its very imp to me plz plz thanx in advance.

My id is sri4u_926@yahoo.com
Title: How can i access a dropdown list inside a grid view from codebehind.   
Name: Vimal Joseph
Date: 7/6/2007 12:36:24 PM
Comment:
Hello ,
i have one problem -How can i access a dropdown list inside a grid view from codebehind.
I placed a dropdown list inside gridview. But am not able access it from code behind for populating data.

Please help me,
Title: CountryStateXml   
Name: Nasim
Date: 6/29/2007 9:00:25 AM
Comment:
very interesting and well notes for AJAX technology.... I really need CountriesAndStates.xml asap. My email id is

nasimrizwee@gmail.com
Title: CountryStateXml   
Name: razana
Date: 6/28/2007 6:17:26 AM
Comment:
Nice presentation and please send me CountryStateXml class file.....

My id:razanabanu@gmail.com
Title: Good work   
Name: Suneel
Date: 6/27/2007 2:37:59 AM
Comment:
Nice article
Title: Thank you   
Name: Lokesh
Date: 6/25/2007 3:13:42 AM
Comment:
Thank you so much.. it helps me lot... I was wondering how to use ajax in asp.net.. you solved out my problem....
Title: Good Job   
Name: manoj mevada
Date: 6/24/2007 3:01:49 AM
Comment:
thanks Ramaprasad,

This article is really useful.

--Manoj
Title: Useful   
Name: SathyaNarayanan
Date: 6/21/2007 10:15:10 AM
Comment:
Its Really Usefull.
Title: Superb And Fantastic   
Name: Prakash and Maapi
Date: 6/21/2007 10:13:36 AM
Comment:
Thanks a lot.I just started Ajax.Its very Interesting
Title: helpful article   
Name: Nihath
Date: 6/21/2007 6:14:48 AM
Comment:
Hi,
now i somewhat satiesfiesd with your article. keep it up.
Title: Help   
Name: Najef
Date: 6/16/2007 12:41:35 AM
Comment:
Hello,

I like yur artikle but have problem. I need to build my web site using AJAX. Can u build for me?
Title: Very good article   
Name: Surya
Date: 6/13/2007 7:21:55 AM
Comment:
This article is in simplified way and handy.Thnk u very much.Please post more articles related to AJAX with ASP.NET which should come across in real time.Please provide full code in the tutorial.
Title: Thanks   
Name: Jagdish Kumar
Date: 6/12/2007 1:46:23 AM
Comment:
Thank u
this is really a good one!!!
Title: Excellent   
Name: YB
Date: 6/9/2007 12:00:49 PM
Comment:
Great tutorial and sample, Simplified and very handy. Will definitrly help me in my ASP.NET coding
Title: The Best   
Name: Jaydit Chitre
Date: 6/5/2007 6:37:24 AM
Comment:
The contents r Described in Very simplified Language and can be easily applicable to similar applications in which one wants to implement AJAX.
Title: countriesindropsown   
Name: pavan naidu
Date: 5/30/2007 4:43:09 AM
Comment:
Hi,
i m trying to populate all countries name in my dropdlownbox in my .net 2.0 application pls help me ouot..
Title: Excellent   
Name: Sachin Singhal
Date: 5/29/2007 6:26:54 AM
Comment:
This is really is good one. I just started to learn AJAX. so try to post more and more article keeping in mind for beginers.
sachin.aks@rediffmail.com
Title: Excellent   
Name: Goutham
Date: 5/28/2007 3:03:41 AM
Comment:
I learning Ajax And ASP.net so it will help me,plz send more info and code sample .
goutham.madipally@yahoo.com
Title: Very Good   
Name: Hanif_TCPL
Date: 5/26/2007 1:41:06 AM
Comment:
hi,
This is a grate artical for begineer,
I learning Ajax And ASP.net so it will help me,plz send more info and code sample .
mulanihanif@yahoo.co.in
Title: Very Good   
Name: Chakravarhty
Date: 5/24/2007 5:24:10 AM
Comment:
It's Nice

Thanks
Title: Method missing   
Name: Akhlesh Chauhan
Date: 5/22/2007 11:27:48 PM
Comment:
hi
its nice one
but some method left out from you please post all related methods .

Thnaks for you article
Title: Hi   
Name: 007
Date: 5/18/2007 6:00:03 AM
Comment:
Hi Ramaprasad Potturi,

You have done a great job. I was searching for a Ajax articles but everywhere it was giving me the unwanted things for beginner.. Its really a simple and good article. I appriciate ur work behind this. Thankig You. Please post more articles related to the Ajax with ASP.Net. And in this article you have skipped some of the methods to extract from the xml and other things. Please do post all.

Thanks a lot...

Good Work
Title: Good   
Name: Good
Date: 5/18/2007 5:53:38 AM
Comment:
This article hepled a lot as I am a beginer to Ajax.. Good one .. Please post more and more good articles related to the Ajax.

Thanks a lot
Title: Problem   
Name: Tushar patel
Date: 5/15/2007 10:23:59 AM
Comment:
hello,
i got this message.. please help me out.
" The type or namespace name 'CountryStateXml' could not be found (are you missing a using directive or an assembly reference?)"

what setting I have to do to solve this..
thanks
ideaphilips@yahoo.com
Title: My Testing   
Name: It is my testing
Date: 5/14/2007 6:50:31 AM
Comment:
Hi i am using ajax
Title: For this Article   
Name: pravin
Date: 5/14/2007 1:37:49 AM
Comment:
Its really excellent.thanks
Title: On Ajax   
Name: Rohit
Date: 5/12/2007 4:30:33 AM
Comment:
I learn something new about ajax thanks
Title: Populating Dropdown using Ajax   
Name: Ganesan S
Date: 5/10/2007 2:12:36 AM
Comment:
Thank you for given this wonderful example let me try and tell you the result later
Title: stock management   
Name: karthika
Date: 5/10/2007 1:46:48 AM
Comment:
i need how the stock management is done in cshop.
Title: Software Engineer   
Name: Roshan Indika - Sri Lanka
Date: 5/9/2007 8:28:48 AM
Comment:
This is excellent. very simple and it is included every thing. explanation is very understandable. Keep up good work and share with us in this site. Thanks you
Title: Excellent Work   
Name: SriRam
Date: 5/8/2007 11:45:25 PM
Comment:
You have done a very good job.This article is very simple and excellent for the people who are new to AJAX.
The code as well as the explanation is very good.

Thanks and well done for this simple and good article.
Title: Nice Work As a Demo   
Name: Simple is beautiful
Date: 4/25/2007 10:51:31 AM
Comment:
The article is easy to understant and traight to the point. Yes, as quite a few people said that it is not getting the view state or lack of database as data source, but come on, this is a demo and it is more than pretty good.
Title: Fantastic example of populating dropdown.   
Name: Ankan Pal
Date: 4/23/2007 9:52:02 PM
Comment:
This is the example I was looking for quite some time. We can infact ping a database server. Its really a good example.
Title: Dropdown SelectedValue is not populationg   
Name: Sri Rama Krishna G
Date: 4/17/2007 4:35:29 AM
Comment:
It's really a good example. But I'm facing a small problem.

I have 3 dropdowns. dd1, dd2 and dd3.
Based on dd1, dd2 will fill and based on dd2, dd3 will fill.

It's population values properly.

While storing values in the database, dd2.selectedvalue is giving 0.

Can you please help me in this problem.

Thanks & Regards,
Sri Rama Krishna G
Title: my email   
Name: nooshin
Date: 4/12/2007 11:17:00 AM
Comment:
my mail is nooshin_sjd@yahoo.com
Title: about this sample project   
Name: nooshin
Date: 4/12/2007 10:16:13 AM
Comment:
hi
you article is the best one that i searched about dropdown+ajax+country+city
you know i m from iran and there is no way to buy this sample complitly coud you help me and get your CountryStateXml()(AjaxSample.dll) classe i have this in dll mode please????????????????/
Title: AJAX   
Name: Amit Dave
Date: 4/10/2007 6:20:48 AM
Comment:
Hi! Ram I have this first time & it;s really a good one for learner. Thanks! would appreciate if u can give more examples like this.

thanks!
Title: Test   
Name: Lalit
Date: 4/9/2007 7:41:22 AM
Comment:
Hi,
This article is usefull for Ajax....

Thanks
Title: AJAX   
Name: Amit Dave
Date: 4/6/2007 9:12:57 AM
Comment:
Hi,
This is a great exmpl u have taken it was realy very useful one. Hope we will get more examples and methodologies.
Title: Values from the database   
Name: Tony
Date: 3/28/2007 2:03:11 AM
Comment:
Hi,i am getting my dropdown values from 2 database tables linked with an ID,i am struggling to figure out how this is going to wrok
Title: AJAX DropDown   
Name: Sheetal
Date: 3/15/2007 2:18:14 AM
Comment:
The code is not working on safari on mac. I need it to work on mac safari as well with dynamically drop downs populating from databse
Title: Countrystatexml class   
Name: Nav
Date: 3/14/2007 6:42:25 AM
Comment:
it's ok but how to create countryandstatexml class it uses three public methods getcountries where is the definition for them and also in ajaxclient page how can we create object for countryandstatexml answer immediately urgent
Title: good   
Name: sunny
Date: 2/26/2007 2:30:21 AM
Comment:
but i have another problem i fill the another dropdown in drop down i fill the value succ... but not value enter to the sql server because this value not in view code
Title: good   
Name: sunny
Date: 2/22/2007 12:18:15 AM
Comment:
but i want to drop down fill by the sql server and second drop down when i select the first drop down
Title: Good   
Name: Anil
Date: 2/14/2007 4:39:53 AM
Comment:
Good Statment and Thanx for Vary Eissy to Understand ur code
Keep it up.
Title: Exemplary   
Name: tvks
Date: 2/14/2007 3:51:37 AM
Comment:
As much as my title is in english language, this article is exemplary among many other articles.
Title: AJAX Beginers   
Name: ramshretty megavath
Date: 2/14/2007 2:52:14 AM
Comment:
Thank u
this is really a good and brief explanation about ajax.nice
.............ram........it is excellent...
thanks again
Title: HelpFull   
Name: venkat prasad j
Date: 2/13/2007 1:45:15 PM
Comment:
its excelent with sample code and explanation keep it up !
Title: Fantastic Article   
Name: Vishal Jadhav
Date: 2/13/2007 4:54:49 AM
Comment:
Its a very nice article. It explains AJAX in a short and simple way so that any guy can be interesting in learning AJAx after reading this article.

Vishal
Title: Very Good Article   
Name: Krunal.Shaholia
Date: 2/7/2007 5:15:08 PM
Comment:
very good article.easy to understand
Title: Nice one.!   
Name: Rajendra Golla
Date: 2/7/2007 2:17:00 AM
Comment:
Really a nice job.keep it up..!
Title: No feedback   
Name: No feedback
Date: 2/6/2007 6:11:50 PM
Comment:
No feedback
Title: Ajax   
Name: Rakesh kumar
Date: 1/31/2007 4:55:17 AM
Comment:
Excellant
Thanks
Title: Nice Article   
Name: Debadutta Swain
Date: 1/27/2007 3:07:23 PM
Comment:
It's really a nice article to learn AJAX but could you please tell me how to bind data in datagrid using AJAX.

Please send me the response to my mail id - debaswain@rediffmail.com
Title: dr   
Name: Sam
Date: 1/26/2007 9:19:51 PM
Comment:
very interesting presentation of AJAX..thank you.
Title: HAI   
Name: joby joseph
Date: 1/24/2007 3:44:47 AM
Comment:
The Article given Regarding Ajax is vey nice.thanks is for ur efforts
Title: Quicky   
Name: Ravi
Date: 1/23/2007 8:06:22 AM
Comment:
Good one for a starter!
Title: Very Good Article   
Name: Ajay c
Date: 1/18/2007 8:23:17 AM
Comment:
Nice reading article, good to see samples of AJAX coming through.
Title: Good Article   
Name: Dipali
Date: 1/18/2007 6:17:21 AM
Comment:
Hello,

This is really very good article for learn ajax.

can u give some idea for upload file (copy file from source to destination) using ajax?

-Dipali
Title: great article   
Name: premkumar
Date: 1/10/2007 9:28:32 AM
Comment:
before reading this article...i dont even know basics of ajax..but now..i have a satisfaction of learning about AJAX to an extent.thanks. for ur helping hand
Title: Good Artical   
Name: jaimeen Modi(mca)
Date: 1/5/2007 5:46:52 AM
Comment:
hi,
this is a good artical but i want to fill frist combobox dynamically from the database.
so i am confusing regarding to the xml file.
hoe can i create xml file during run time.
any sugetion pls send me on : modijaimin.mca@gmail.com

ok,
thanks again.....
Title: Good   
Name: Joydip
Date: 1/5/2007 4:54:34 AM
Comment:
Hi,

This is an excellent article. Keep it up. Please find my blog at:--

http://aspadvice.com/blogs/joydip/

_Joydip
Title: gr8 work ...   
Name: Anil Sood
Date: 1/3/2007 1:55:24 AM
Comment:
Good insight into AJAX for beginners ..

Anil Sood
Title: Good   
Name: Deepti
Date: 1/1/2007 5:32:37 AM
Comment:
Good and informative...Gives a precise but clear picture of AJAX to a beginner like me.
Title: ajax   
Name: don
Date: 12/25/2006 6:39:22 AM
Comment:
great
Title: Great   
Name: Raghavan
Date: 12/22/2006 12:18:22 PM
Comment:
Very Good Article explained with an example simply good
Title: Very Nice   
Name: Rajendra Prasad
Date: 12/22/2006 4:47:46 AM
Comment:
This is very good article, clear understanding and ver nice.
Title: Informative Article   
Name: Ali Raza
Date: 12/22/2006 4:12:23 AM
Comment:
well explained !
Title: Excellent Article   
Name: rajani kanth
Date: 12/21/2006 2:12:13 AM
Comment:
Well and nice article. simply superb.........!
Title: abc   
Name: prakash
Date: 12/18/2006 1:43:18 AM
Comment:
Good for implementation.
Title: Get started in AJAX   
Name: Hasanul Banan
Date: 12/14/2006 2:59:16 AM
Comment:
Hai using this article i am able to get into the ajac world. That now i can make it in my hands
Title: AJAX   
Name: Vipin
Date: 12/10/2006 11:29:08 PM
Comment:
Its superb one.really help me a lot.Thank You
Title: Shabih   
Name: shabih
Date: 12/1/2006 12:00:56 AM
Comment:
GOOOOOOOOOOOOOOD
Title: Best Article   
Name: Anant Kumar
Date: 11/30/2006 4:36:01 AM
Comment:
article is very much useful for beginers
Title: Populating a DropDownList using AJAX and ASP.NET   
Name: Max
Date: 11/27/2006 2:07:33 AM
Comment:
its a good article but more example will make it best
Title: goood   
Name: nice
Date: 11/27/2006 1:52:33 AM
Comment:
very very very very good
i have got an idea on this ajax
Title: Thanks   
Name: Heena
Date: 11/25/2006 6:31:04 AM
Comment:
Thanks.
Title: Mr   
Name: Rizwan
Date: 11/24/2006 3:10:16 AM
Comment:
hi its really a very nice article...for me...thx..
Title: Nice Article   
Name: S.Rockin Benjamin
Date: 11/16/2006 7:37:37 AM
Comment:
hi, This is a very nice article with a suitabel example. how can i get the result from the DB.
Title: I Like It (Thanks )   
Name: Sohail Riaz
Date: 11/16/2006 3:16:43 AM
Comment:
Very Good Work: Will U please Send me the solution About that How to use it While Coonnecting To a Data Base And Using DataGrid Or Data List.please send this Solution To me
At desert_of_hope1@yahoo.com or Just Upload it on The Site

I will be Thank Full to you
Please Send it to me
Title: Very Good Article   
Name: Lokendra S. Solanki
Date: 11/15/2006 11:29:01 PM
Comment:
This is very good article to know about ajax and how to user it
Title: Very Nice   
Name: Asif Virk
Date: 11/15/2006 6:35:07 AM
Comment:
Very Good Work about AJAX.I never Seen on the Internet
Title: Good article   
Name: Ravi kant
Date: 11/13/2006 12:58:19 PM
Comment:
it is a very good article on Ajax with Sample code.

Must Read!!
Title: Nice Article   
Name: Priyavart
Date: 11/1/2006 4:04:00 AM
Comment:
Nice article on ajax amongst the article i have gone through.
Title: Good Explaination   
Name: Manish
Date: 10/26/2006 6:23:21 AM
Comment:
You all have done good job. I would like to suggest that one more example should be added
Title: Mr   
Name: Hare Ram Yadav
Date: 10/26/2006 12:18:38 AM
Comment:
Great Job
Title: Mr   
Name: Ratheesh
Date: 10/20/2006 6:33:48 AM
Comment:
Excellent. Can i directly read data from sqlserver database and fill it in the combos.plz give me some help
Title: Thanks for your article   
Name: karimnagar
Date: 10/19/2006 5:39:11 AM
Comment:
good Article with sample code and examples. Very Good Work about AJAX..
Title: Best Article for Ajax   
Name: Dhananjay Mishra
Date: 10/16/2006 6:39:50 AM
Comment:
This is good article for Ajax fundamental......
The author has been presented contents in a very impressive manner.Definately it will help me in understanding of Ajax.
Title: very well   
Name: Ashis nayak
Date: 10/7/2006 9:22:15 AM
Comment:
Thankx for ur help
Title: Very Informative   
Name: SACHIN SHANBHAG
Date: 10/6/2006 7:46:39 AM
Comment:
ARTICLE WAS VERY INFORMATIVE ..

THANKS IN ADVANCE
KEEP THE GOOD WORK GOING
Title: Mr   
Name: Mike Ruse
Date: 10/1/2006 6:45:00 AM
Comment:
Is there anyway to make it so that the parent list is a multi-select list and that the child list is a combinaton of the children for the selected parent items
Title: how can use the dats from database im both dropdown   
Name: Neeraj Tiwari
Date: 9/29/2006 3:34:21 AM
Comment:
Hi,
I am satisfied with u,In asp.net 2005 ,how can use data from database where I am using SqlDataSource
Plz send me answer

PlZZZZZZZZZ


Thank u
Title: Great   
Name: Frederickson Fernandaz
Date: 9/28/2006 2:15:26 AM
Comment:
This article is really great, i will help lot me to learn Ajax,but in this no Reference with Ajax.dll, But how it's work with Ajax

Thank u
Regards Fred
Title: Thanks !   
Name: maphongvu
Date: 9/26/2006 10:30:48 PM
Comment:
Very good Article !
Thank you !
I hop you will post more than.

--maphongvu
Title: mr   
Name: mahesh
Date: 9/22/2006 10:49:39 AM
Comment:
good explanation about ajax...
but consontarte on the problem after populating the states dropdown... if want to select item of states and the value of the item ..it is not working .. try to solve it
Title: AJAX....   
Name: Kantha Moorthy Selvam
Date: 9/21/2006 6:12:38 AM
Comment:
Nice article for AJAX starter....
Title: Fantastic Artical   
Name: Disa
Date: 9/18/2006 6:01:09 AM
Comment:
Explanation Way is Excellent
Title: Nice reading   
Name: arun thakur
Date: 9/8/2006 1:32:32 AM
Comment:
thank you..to provide such good example
Title: Good Article   
Name: Anuradha
Date: 9/8/2006 12:54:00 AM
Comment:
Very clearly and nicely explained.

Thanks

Regards

Anuradha
Title: How to get the state value from dropdown box (ANSWER!!!)   
Name: sekar
Date: 9/5/2006 12:39:25 PM
Comment:
Please use the name of the control to get the value in the server side (not using id) thru request.form

eg. request.form["fvFranchiseContract$ddlBusinessArea"]

This is the tag generated by the program.

select name="fvFranchiseContract$ddlBusinessArea" id="fvFranchiseContract_ddlBusinessArea"

I tested this and its working fine. I hope this will answer for the most of the people who asked datalost question in the serverside.

please mail me @ ssekar76@hotmail.com if u have any doubt.

thanks
sekar
Title: How to get the state value from dropdown box   
Name: Raj
Date: 9/4/2006 9:24:51 AM
Comment:
Hi Your article is very very Nice. But i have small doubt. I cant able to get the state value from dropdown box. Can you please check it and give me idea
Title: Good but... useless   
Name: Tony Mo
Date: 9/1/2006 12:52:41 PM
Comment:
I am seeing a lot of people here praising this article, I guess they never bothered trying the code to see that it is useless because the populating the drop down list on the client side makes the SelectedValue empty on post back because the new values are unknown to the view state. Some people brought this point but nobody bothered reading them!
I wonder where the author is!
Title: Fine Article   
Name: Prabhu
Date: 8/29/2006 1:36:24 AM
Comment:
I have worked this code. It was working fine. But i am not able to get the selected item from state list in server code.Can u help me to get the selected item from the selected state list.
Title: nice example   
Name: manmohan chauhan
Date: 8/28/2006 9:43:28 AM
Comment:
Nice reading article, good to see samples of AJAX coming through.
------Manu
Title: Good One To Start With   
Name: Praveen-TheOnlyOne
Date: 8/24/2006 5:37:48 AM
Comment:
This is a verrry good artical to start AJAX. It helped me a lot in my project.
Good work Keep it up!!!

Some more examples of AJAX with ASP.NET are required.
Title: how I can get the combo value ????   
Name: Moises
Date: 8/14/2006 10:46:49 PM
Comment:
How I can call to value dropdownlist???
Title: Good Article   
Name: vinod kumar
Date: 8/12/2006 3:45:46 AM
Comment:
The article is really useful for those who are new to AJAX.
Written in a simple language it really helps to understand the AJAX
Title: good article   
Name: good article
Date: 8/5/2006 12:39:42 AM
Comment:
good article
Title: Good One but still some confusion regarding javascript   
Name: sushmita
Date: 8/4/2006 6:20:28 AM
Comment:
Hi

I understand a lot from this article but have one confusion. Suppose anyone changes his browser settings and disable javascript than what wil happen???

answer is the AJAX part of the site wont work,so what is the advantage of AJAX than

Please reply
my id sushmitahere@hotmail.com
Title: Good One but still some confusion regarding javascript   
Name: sushmita
Date: 8/4/2006 6:18:30 AM
Comment:
Hi
Title: Good Artical   
Name: Kapil Dhawan
Date: 8/1/2006 1:26:19 AM
Comment:
its Really a Good artical...
i dint knew bout AJAX before reading this AJAX..
Title: Best One   
Name: Ashbind
Date: 7/31/2006 11:22:40 AM
Comment:
New Techs
Title: articles should be like his one   
Name: charu
Date: 7/31/2006 3:41:49 AM
Comment:
to all the members. if you really want to help others then article should be like this.
I really like the authors and would like to thank them as they helped me a lot
Title: Mr.   
Name: Rohit Madhav Marathe
Date: 7/30/2006 12:23:45 PM
Comment:
Too got We want more articles of this type.Simply excellent.
Title: use sample in gridview   
Name: atefeh
Date: 7/24/2006 7:31:07 AM
Comment:
hi
i want use this sample in gridview.what i do?
i want add 2 dropdownlist(ajaxsample) in 2 column of gridview and fill second dropdownlist with change of first.
please help me
Title: That is what we require   
Name: Amol & Lalit
Date: 7/17/2006 7:24:51 AM
Comment:
hi this is what we are finding the exact things....
thanks for posting this nice article.
Title: use your sample in grid   
Name: developer
Date: 7/16/2006 5:59:08 AM
Comment:
hi
your article was very good
how can i use this sample in dataview.
i want put dropdownlist in cell of dataview grid and when i chang one dropdownlist another dropdownlist fill
please help me
Title: NIce   
Name: Kaushik Ganguly
Date: 7/11/2006 8:05:28 AM
Comment:
Nice for Ajax Beginner
Title: Very Good Article   
Name: B.Ramakrishna Reddy
Date: 7/11/2006 5:09:28 AM
Comment:
This article is worthful to read abt Ajax. Example also given as good
Title: Excellent   
Name: Umair Shahid
Date: 7/10/2006 5:45:44 AM
Comment:
Exceeeeeeeeeeeeeeellllllllllllllent
Title: Good one for all level.