473,507 Members | 2,472 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 11 '05 #1
3 9839
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 11 '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 11 '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 11 '05 #4

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

Similar topics

3
589
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
2100
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
2077
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
369
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
6518
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
5259
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
1160
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
3057
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
2028
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
3449
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
7223
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
7114
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
7377
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
7488
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
5623
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
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1544
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.