[thelist] populating a drop down list from an XML doc

Martyn Haigh martyn.haigh at virgincosmetics.com
Tue Mar 11 04:56:58 CST 2003


Hey,

Really sorry about the newbie question here - but everyone has to start
somewhere!!

I'm just writing my first real asp.net app in C# - and was wondering if
someone can help me out with this problem (I think it is a relatively easy
problem - but the whole binding is confusing me!)

I have an XML file :

<?xml version="1.0" encoding="utf-8" ?> 
<department>
	<departmentName>IT</departmentName>
	<pathToIntranet>/IT/default.aspx</pathToIntranet>
</department>
<department>
	<departmentName>web</departmentName>
	<pathToIntranet>/web/ default.aspx </pathToIntranet> </department>

and a .net page with a drop down list called ddlDepartments.  All I want to
do is to read from the XML file so that the ddlDepartments values =
pathToIntranet and the text = departmentName.

I've tried a few things - but it's just annoying me now.

Thank you



Martyn Haigh


DISCLAIMER: The information in this email is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this email by
anyone else is unauthorised. If you are not the intended recipient, any
disclosure, copying, distribution or any action taken or omitted to be taken
in reliance on it, is prohibited and may be unlawful.




More information about the thelist mailing list