Connecting Tech Pros Worldwide Help | Site Map

USING XML TO FILL LINKED DROPDOWN LIST

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 11th, 2005, 09:55 PM
Jim Mitchell
Guest
 
Posts: n/a
Default 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.



  #2  
Old November 11th, 2005, 09:55 PM
Oleg Tkachenko
Guest
 
Posts: n/a
Default Re: USING XML TO FILL LINKED DROPDOWN LIST

Jim Mitchell wrote:
[color=blue]
> 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.[/color]
Client side DHTML scripting with XML islands?
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

  #3  
Old November 11th, 2005, 09:55 PM
Russell Jones
Guest
 
Posts: n/a
Default Re: USING XML TO FILL LINKED DROPDOWN LIST

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" <jim_mitchell@mindspring.com> wrote in message
news:ekr4WJxZDHA.2632@TK2MSFTNGP12.phx.gbl...[color=blue]
> My Goal is to have a dropdown (DL2) filled from the selectIndexChange[/color]
event[color=blue]
> 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[/color]
refresh[color=blue]
> 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[/color]
make[color=blue]
> it more efficient?
>
> Thanks in advance.
>
>[/color]


  #4  
Old November 11th, 2005, 09:55 PM
Jim Mitchell
Guest
 
Posts: n/a
Default Re: USING XML TO FILL LINKED DROPDOWN LIST

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" <arj1@nospam.northstate.net> wrote in message
news:u8FSNhyZDHA.2620@TK2MSFTNGP09.phx.gbl...[color=blue]
> You can use either client-side code that reads an included XML file (see[/color]
the[color=blue]
> <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" <jim_mitchell@mindspring.com> wrote in message
> news:ekr4WJxZDHA.2632@TK2MSFTNGP12.phx.gbl...[color=green]
> > My Goal is to have a dropdown (DL2) filled from the selectIndexChange[/color]
> event[color=green]
> > 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[/color]
> refresh[color=green]
> > 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[/color]
> make[color=green]
> > it more efficient?
> >
> > Thanks in advance.
> >
> >[/color]
>
>[/color]


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.