VB.NET•Define DataList

Listing 2. Use the DataList control to create a sectional listing and an inline editing Web page.

<asp:DataList id="pubsDataList" runat="server">
<ItemTemplate>
   <b>
   <asp:linkbutton runat="server"
      CommandName="Special" 
      Text='<%# Container.DataItem("au_lname")%>'
      runat="server">
   </asp:linkbutton>
   </b>,
   <%# Container.DataItem("au_fname")%>
   <br>
   <%# Container.DataItem("address")%>
   <br>
   <%# Container.DataItem("city")%>
   ,
   <%# Container.DataItem("state")%>
   <%# Container.DataItem("zip")%>
   <br>
   <%# Container.DataItem("phone")%>
   <br>
   <asp:LinkButton ID="EditButton" 
      CommandName="edit"
      runat="server">Edit
   </asp:LinkButton>
   <asp:LinkButton ID="DeleteButton"
      CommandName="delete"
      runat="server">Delete
   </asp:LinkButton>
</ItemTemplate>
<EditItemTemplate>
   <asp:TextBox ID="txtLastName" 
      text='<%# Container.DataItem("au_lname")%>'
      runat="server">
   </asp:TextBox>
   ,
   <asp:TextBox ID="txtFirstName" 
      text='<%# Container.DataItem("au_fname")%>'
      runat="server">
   </asp:TextBox>
   <br>
   <asp:TextBox ID="txtAddress" 
      text='<%# Container.DataItem("address")%>'
      runat="server">
   </asp:TextBox>
   <br>
   <asp:TextBox ID="txtCity" 
      text='<%# Container.DataItem("city")%>'
      runat="server">
   </asp:TextBox>
   ,
   <asp:TextBox ID="txtState" 
      text='<%# Container.DataItem("state")%>'
      runat="server">
   </asp:TextBox>
   <asp:TextBox ID="txtZip" 
      text='<%# Container.DataItem("zip")%>'
      runat="server">
   </asp:TextBox>
   <br>
   <asp:TextBox ID="txtPhone" 
      text='<%# Container.DataItem("phone")%>'
      runat="server">
   </asp:TextBox>
   <br>
   <asp:LinkButton ID="UpdateButton"
      CommandName="update"
      runat="server">Update
   </asp:LinkButton>
   <asp:LinkButton ID="CancelButton"
      CommandName="cancel"
      runat="server">Cancel
   </asp:LinkButton>
</EditItemTemplate>
<SeparatorTemplate>
   <hr>
</SeparatorTemplate>
</asp:DataList>