Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populate a list box from xml on the client.

Status
Not open for further replies.

nzcam

Programmer
Mar 5, 2003
36
0
0
NZ
I have a xml file that is held on the client machine.

I would like to databind this to a listbox without sending it back to the server?

How do I do this
 
You can't in ASP.NET as it is a server side language. The only thing you could possibly do is use a client-side method such as javascript or an ActiveX control.


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244.
 
in addtion to to what ca8msm said. if you populate a list box from the client using JS (file still must be accessible from the server); event validation will fail because the value didn't originate from the server. (this is by design).

I found this out while experimenting with cascading dropdowns in the MS AJAX toolkit.

you could turn off event validation for this specific page. I consider that poor programming design and would not recommend it. then again, if the information is not that sensative, it's not a threat so you could disable the validation.

if you need to populate the list box from their computer, the user will need to upload the file to the server. then have the server populate the dropdown list with the xml file located on the server.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top