<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SQL" %>
<html>
<script language="C#" runat="server">
void Page_Load(Object sender, EventArgs e) {
SQLConnection myConnection = new
SQLConnection("server=localhost;uid=sa;pwd=;database=northwind");
SQLDataSetCommand myCommand = new SQLDataSetCommand("select * from
customer", myConnection);
DataSet ds = new DataSet();
myCommand.FillDataSet(ds, "Customer");
ListBox1.DataSource = ds.Tables["Customer"].DefaultView;
ListBox1.DataBind();
}
</script>
<body>
<asp:ListBox id="ListBox1" runat="Server" DataTextField="CustomerID"
DataValueField="ComanpyName"/>
</body>
</html>
/Fredrik Normén