Hi Thor,
the following ASPX shows it is possible. You do have to bind to an
attribute though. I wasn't able to bind to a inner child.
Grtz, Wouter van Vugt
Trainer - Info Support -
www.infosupport.com www.dive-in-it.nl
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected override void OnLoad(EventArgs e)
{
DropDownList1.DataBind();
base.OnLoad(e);
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:DropDownList ID="DropDownList1" runat="server"
DataSourceID="XmlDataSource1" DataTextField="ID">
</asp:DropDownList>
<asp:XmlDataSource ID="XmlDataSource1" runat="server">
<Data>
<Customers>
<Customer id="Customer1">
<ID>Customer1</ID>
<Name>First Customer</Name>
</Customer>
<Customer id="Customer2">
<ID>Customer2</ID>
<Name>Second Customer</Name>
</Customer>
<Customer id="Customer3">
<ID>Customer3</ID>
<Name>Third Customer</Name>
</Customer>
<Customer id="Customer4">
<ID>Customer4</ID>
<Name>Fourth Customer</Name>
</Customer>
</Customers></Data>
</asp:XmlDataSource>
</div>
</form>
</body>
</html>