473,383 Members | 1,818 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,383 software developers and data experts.

How to repopulate a dropdown list without posting back?

I have two dropdown list(ie State and Region) that are populated with
data from database.
I want to repopulate the second dropdown list(Region) according to what
state user has selected without posting back to the server.

How do I implement this?

Thanks a lot in advance.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #1
4 2289
Hi,

You should get all the data to the client (you can use XML islands[1])
and then use java script and the DHTML objects[2] to clear the list and
add new items to the list[3] or just change the inner html.

[1] -
http://msdn.microsoft.com/library/de.../en-us/xmlsdk3
0/htm/xmconxmldataislands.asp
[2] -
http://msdn.microsoft.com/library/de...p/author/dhtml
/reference/objects.asp
[3] -
http://msdn.microsoft.com/library/de...p/author/dhtml
/reference/objects.asp

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #2
Cut and paste the two parts of the URL to the explorer.

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 17 '05 #3
The URLs are wrapped on the lines. Make sure you get the whole address. They
work fine.

"TaeHo Yoo" <yo******@yahoo.com> wrote in message
news:en**************@TK2MSFTNGP12.phx.gbl...
Thanks Natty Gur for your advice.
However, none of links you provided work.
Could you tell me again?

Appreciate.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 17 '05 #4
Ram
You can do it in this way.

1. Put all your functionality for getiing the data of your second drop
down in an ASPX page, and return the results as a XML content.
2.Create an XML DOM object on the client side and load the aspx page
into that object. You can also pass the query string.
Ex: xmlDocObj.load("yourpage.aspx?querystring=value);
3. Now you have all the data for the second drop down in the xml
object on the client side.
4. Parse through the XML object and populate the drop down.

Thanks
Ram Pabbaraju

TaeHo Yoo <yo******@yahoo.com> wrote in message news:<#f*************@TK2MSFTNGP12.phx.gbl>...
I have two dropdown list(ie State and Region) that are populated with
data from database.
I want to repopulate the second dropdown list(Region) according to what
state user has selected without posting back to the server.

How do I implement this?

Thanks a lot in advance.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 17 '05 #5

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

Similar topics

2
by: Christer Alkerud | last post by:
Hi I hope anyone can give me a hint how to continue I have an ASP page containing 3 list boxes. When the page is opened the list boxes are populated with some default values from a...
3
by: phil2phil | last post by:
hi, had a question on preloading a dropdown. we have a textbox and dropdown on the page, user is suppose to enter in a zip into textbox, then the dropdown should load the state based on the zip. ...
0
by: cindy | last post by:
I have a dynamic datagrid. I have custom classes for the controls public class CreateEditItemTemplateDDL : ITemplate { DataTable dtBind; string strddlName; string strSelectedID; string...
5
by: Hamayun Khan | last post by:
Hi Basically I m PHP developer but Now i have project in asp.net 2005. I m new to ASP.NET 2005. Even I have no experience of the earlier versions of asp.net. At this point I need some help for...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.