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

USING XML TO FILL LINKED DROPDOWN LIST

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 that will not require the screen to refresh
every time.

1) If I use HTML dropdown lists, how do I trigger a postback?
2) Can I load XML into the viewstate and use the viewstate data somehow?
3) Should I just bite the bullet and let the screen refresh? How can I make
it more efficient?

Thanks in advance.
Nov 19 '05 #1
3 1303
Jim Mitchell wrote:
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 that will not require the screen to refresh
every time.

Client side DHTML scripting with XML islands?
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Nov 19 '05 #2
You can use either client-side code that reads an included XML file (see the
<xml> tag for more info) or a Web service to accomplish this without
refreshing the screen. For the first method, create an MSXML document and
use XPath to extract the cotents of the picklist based on the user's
selection in the main list. For the second, use the XMLHTTP control or
remote scripting to obtain the data from the server and populate the pick
list. If you have only IE clients, you can use the Web services toolkit to
simplify parsing the Web service return value; otherwise, you'll have to
parse the returned data yourself (not a big deal).

If the pick lists are small and there aren't too many of them, you can
pre-build all of them on the server and simply hide and show them on the
client based on the user's selection in the main list, again using
client-side code.

"Jim Mitchell" <ji**********@mindspring.com> wrote in message
news:ek**************@TK2MSFTNGP12.phx.gbl...
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 that will not require the screen to refresh every time.

1) If I use HTML dropdown lists, how do I trigger a postback?
2) Can I load XML into the viewstate and use the viewstate data somehow?
3) Should I just bite the bullet and let the screen refresh? How can I make it more efficient?

Thanks in advance.

Nov 19 '05 #3
Thanks - It sounds like client side code makes the most sense. I guess in
some cases, there is no way to write an efficient app with all server
controls. This might be a good example.

CAN YOU TELL ME HOW TO INITIATE A POSTBACK FROM A CLIENT EVENT? I can
always call the whole page again, but is there a way to tell the server this
is a postback from javascript?

Thanks again.

Jim
"Russell Jones" <ar**@nospam.northstate.net> wrote in message
news:u8**************@TK2MSFTNGP09.phx.gbl...
You can use either client-side code that reads an included XML file (see the <xml> tag for more info) or a Web service to accomplish this without
refreshing the screen. For the first method, create an MSXML document and
use XPath to extract the cotents of the picklist based on the user's
selection in the main list. For the second, use the XMLHTTP control or
remote scripting to obtain the data from the server and populate the pick
list. If you have only IE clients, you can use the Web services toolkit to
simplify parsing the Web service return value; otherwise, you'll have to
parse the returned data yourself (not a big deal).

If the pick lists are small and there aren't too many of them, you can
pre-build all of them on the server and simply hide and show them on the
client based on the user's selection in the main list, again using
client-side code.

"Jim Mitchell" <ji**********@mindspring.com> wrote in message
news:ek**************@TK2MSFTNGP12.phx.gbl...
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 that will not require the screen to

refresh
every time.

1) If I use HTML dropdown lists, how do I trigger a postback?
2) Can I load XML into the viewstate and use the viewstate data somehow?
3) Should I just bite the bullet and let the screen refresh? How can I

make
it more efficient?

Thanks in advance.


Nov 19 '05 #4

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...
3
by: Maurice Mertens | last post by:
Hi all, In VB.NET you can set the DropDownStyle for a combobox to 'DropDown' or 'DropDownList'. When you set it to DropDownList, it supports auto-fill. But when you set it to 'DropDown', the...
1
by: Kaneda | last post by:
Hello everyone! I have some weird(?) problems, and I am not quite sure if there are due to my errors or maybe a limitation in the .Net framework. I have a ComboBox I need to fill with the...
2
by: K R Lal | last post by:
Hi, Any idea how to fill a dropdownlist thru dataset I done like this ddLst1.DataSource = myDataSet ddLst1.DataMember = myDataSet.Tables(0).Columns(1).Caption ddLst1.DataValueField =...
5
by: SirPoonga | last post by:
I think I'd have to do a combination of ASP and javascript to do this. What I want to do fill the first drop down box with values from a database query. Then based off that selection fill in the...
1
by: mikeybe | last post by:
Making a very simple library circulation database for a school project. I have a Patron Information table(patronID, first name, last name, phone) , an item information table (bookID, book title,...
0
by: Nathan | last post by:
Hello all, Thanks for all your help in the past. To start off, I'm much more familiar with the web aspect of this stuff. So a DropDownList in the middle of a DataSet or Repeater is no big...
3
by: LacOniC | last post by:
Hi. I'm new to C# especially to arrays. I need a 3 dimension array to fill a dropdown list in a web page. TypeOfTest | MinPoint | Value I'll use Type of Test and Value in dropdown. MinPoint...
8
by: tagg3rx | last post by:
Hi All, I have created a panel as a place holder on an input interface and I want to be able to dynamicaly fill it with drop down lists, check boxes etc. So below I'll show you the two main pieces...
1
by: bytesFTW99 | last post by:
I have been struggling with this for some time can anyone help out? just trying to have 3 dropdown boxes that fill depending on what is selected, then in some cases click a button and have the second...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
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
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,...

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.