.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:ListView ID="lvEmployee" runat="server" InsertItemPosition="LastItem" OnItemInserting="lvEmployee_ItemInserting" OnItemDeleting="lvEmployee_ItemDeleting" OnItemEditing="lvEmployee_ItemEditing" OnItemCanceling="lvEmployee_ItemCanceling" > <LayoutTemplate> <table id="Table1" runat="server"> <tr id="Tr1" runat="server"> <td id="Td1" runat="server"> <table id="itemPlaceholderContainer" runat="server" border="0" style=""> <tr id="Tr2" runat="server" style=""> <th id="Th1" runat="server"> </th> <th id="Th2" runat="server"> ID </th> <th id="Th3" runat="server"> Name </th> </tr> <tr id="itemPlaceholder" runat="server"> </tr> </table> </td> </tr> <tr id="Tr3" runat="server"> <td id="Td2" runat="server" style=""> </td> </tr> </table> </LayoutTemplate> <ItemTemplate> <tr style=""> <td> <asp:Button ID="DeleteButton" runat="server" CommandName="Delete" Text="Delete" /> <asp:Button ID="EditButton" runat="server" CommandName="Edit" Text="Edit" /> </td> <td> <asp:Label ID="lblID" runat="server" Text='<%# Bind("ID") %>' /> </td> <td> <asp:Label ID="lblName" runat="server" Text='<%# Bind("Name") %>' /> </td> </tr> </ItemTemplate> <InsertItemTemplate> <tr style=""> <td> <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" /> <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" /> </td> <td> </td> <td> <asp:TextBox ID="txtID" runat="server" Text='<%# Bind("ID") %>' /> </td> <td> <asp:TextBox ID="txtName" runat="server" Text='<%# Bind("Name") %>' /> </td> <td> <asp:Button ID="btnUpdate" runat="server" Text="Update" OnClick="btnUpdate_Click" /> </td> </tr> </InsertItemTemplate> </asp:ListView> </div> </form> </body> </html>
|