Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Caching / August 2003

Tip: Looking for answers? Try searching our database.

USING XML TO FILL LINKED DROPDOWN LIST

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jim Mitchell - 20 Aug 2003 12:56 GMT
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.
Russell Jones - 20 Aug 2003 15:35 GMT
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.

> 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
[quoted text clipped - 9 lines]
>
> Thanks in advance.
Jim Mitchell - 20 Aug 2003 15:48 GMT
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

> 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
[quoted text clipped - 27 lines]
> >
> > Thanks in advance.
Oleg Tkachenko - 20 Aug 2003 16:30 GMT
> 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?
Signature

Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.