Web >> Development >> ASP.Net >> Database >>  How to do database binding with DataList control

<body> <form runat="server"> <asp:DataList id="addressbook" runat="server" cellpadding="2" cellspacing="2" borderstyle="inset" backcolor="#e8e8e8" width="100%" headerstyle-font-name="Verdana" headerstyle-font-size="12pt" headerstyle-horizontalalign="center" headerstyle-font-bold="True" itemstyle-backcolor="#778899" itemstyle-forecolor="#ffffff" footerstyle-font-size="9pt" footerstyle-font-italic="True"> <HeaderTemplate> Customers Table </HeaderTemplate> <ItemTemplate> <%#Container.DataItem("name")%> | <%#Container.DataItem("tel")%> | <%#Container.DataItem("address")%> </ItemTemplate> <FooterTemplate> Source: Demo Database </FooterTemplate> </asp:DataList> </form> </body> </html>