<%@ Page Language="VB" %>
<%@ Import Namespace="System.Data"%>
<script runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
Dim ds As New DataSet
ds.ReadXml(MapPath("XML/customer.xml"))
'*** DropDownlist ***'
With Me.myDDL1
.DataSource = ds
.DataTextField = "Name"
.DataValueField = "CustomerID"
.DataBind()
End With
End Sub
</script>
<html>
<head>
<title>ThaiCreate.Com ASP.NET - XML</title>
</head>
<body>
<form id="form1" runat="server">
<asp:DropDownList id="myDDL1" runat="server"></asp:DropDownList>
</form>
</body>
</html>