Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="MainPage.aspx.cs" Inherits="MainPage" EnableEventValidation="true" %>
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head runat="server">
- <title></title>
- </head>
- <body>
- <form id="form1" runat="server">
- <asp:Repeater ID="Database_Content" runat="server" OnItemCommand="Database_Content_ItemCommand">
- <HeaderTemplate>
- <table cellspacing="0" rules="all" border="1">
- <tr>
- <th scope="col" style="width: 80px">Id
- </th>
- <th scope="col" style="width: 120px">Name
- </th>
- <th scope="col" style="width: 100px">Cena
- </th>
- <th scope="col" style="width: 40px">Edit</th>
- <th scope="col" style="width: 40px">Delete</th>
- </tr>
- </HeaderTemplate>
- <ItemTemplate>
- <tr>
- <td>
- <asp:Label ID="lblCustomerId" runat="server" Text='<%# Eval("ID") %>' />
- </td>
- <td>
- <asp:Label ID="lblContactName" runat="server" Text='<%# Eval("Nazwa") %>' />
- </td>
- <td>
- <asp:Label ID="lblCountry" runat="server" Text='<%# Eval("Cena") %>' />
- </td>
- <td>
- <asp:Button ID="btnEdit" runat="server" Text="Edit"
- CommandArgument='<%#Eval("ID") %>' CommandName="btnEdit" />
- </td>
- <td>
- <asp:Button ID="btnDelete" runat="server" Text="Delete"
- CommandArgument='<%#Eval("ID") %>' CommandName="btnDelete" />
- </td>
- </tr>
- </ItemTemplate>
- </asp:Repeater>
- <table cellspacing="0" rules="all" border="2">
- <tr>
- <th scope="col" style="width: 80px">Id
- </th>
- <th scope="col" style="width: 80px">Nazwa
- </th>
- <th scope="col" style="width: 80px">Cena
- </th>
- <th scope="col" style="width: 40px">Add
- </th>
- </tr>
- <tr>
- <td>
- <asp:TextBox ID="txbID" runat="server" Text=""></asp:TextBox>
- </td>
- <td>
- <asp:TextBox ID="txbNazwa" runat="server" Text=""></asp:TextBox>
- </td>
- <td>
- <asp:TextBox ID="txbCena" runat="server"></asp:TextBox>
- </td>
- <td>
- <asp:Button ID="btnAdd" runat="server" OnClick="btnAdd_Click" Text="Add New Item" />
- </td>
- </tr>
- </table>
- <asp:Label ID="lblError" runat="server" Text=""></asp:Label>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement