Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.08 KB | None | 0 0
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="MainPage.aspx.cs" Inherits="MainPage" EnableEventValidation="true" %>
  2.  
  3. <!DOCTYPE html>
  4.  
  5. <html xmlns="http://www.w3.org/1999/xhtml">
  6. <head runat="server">
  7. <title></title>
  8. </head>
  9. <body>
  10. <form id="form1" runat="server">
  11.  
  12. <asp:Repeater ID="Database_Content" runat="server" OnItemCommand="Database_Content_ItemCommand">
  13.  
  14. <HeaderTemplate>
  15. <table cellspacing="0" rules="all" border="1">
  16. <tr>
  17. <th scope="col" style="width: 80px">Id
  18. </th>
  19. <th scope="col" style="width: 120px">Name
  20. </th>
  21. <th scope="col" style="width: 100px">Cena
  22. </th>
  23. <th scope="col" style="width: 40px">Edit</th>
  24. <th scope="col" style="width: 40px">Delete</th>
  25. </tr>
  26. </HeaderTemplate>
  27. <ItemTemplate>
  28. <tr>
  29. <td>
  30. <asp:Label ID="lblCustomerId" runat="server" Text='<%# Eval("ID") %>' />
  31. </td>
  32. <td>
  33. <asp:Label ID="lblContactName" runat="server" Text='<%# Eval("Nazwa") %>' />
  34. </td>
  35. <td>
  36. <asp:Label ID="lblCountry" runat="server" Text='<%# Eval("Cena") %>' />
  37. </td>
  38. <td>
  39. <asp:Button ID="btnEdit" runat="server" Text="Edit"
  40. CommandArgument='<%#Eval("ID") %>' CommandName="btnEdit" />
  41. </td>
  42. <td>
  43. <asp:Button ID="btnDelete" runat="server" Text="Delete"
  44. CommandArgument='<%#Eval("ID") %>' CommandName="btnDelete" />
  45. </td>
  46. </tr>
  47.  
  48. </ItemTemplate>
  49. </asp:Repeater>
  50.  
  51.  
  52. <table cellspacing="0" rules="all" border="2">
  53. <tr>
  54. <th scope="col" style="width: 80px">Id
  55. </th>
  56. <th scope="col" style="width: 80px">Nazwa
  57. </th>
  58. <th scope="col" style="width: 80px">Cena
  59. </th>
  60. <th scope="col" style="width: 40px">Add
  61. </th>
  62. </tr>
  63. <tr>
  64. <td>
  65. <asp:TextBox ID="txbID" runat="server" Text=""></asp:TextBox>
  66. </td>
  67. <td>
  68. <asp:TextBox ID="txbNazwa" runat="server" Text=""></asp:TextBox>
  69. </td>
  70. <td>
  71. <asp:TextBox ID="txbCena" runat="server"></asp:TextBox>
  72. </td>
  73. <td>
  74. <asp:Button ID="btnAdd" runat="server" OnClick="btnAdd_Click" Text="Add New Item" />
  75. </td>
  76. </tr>
  77. </table>
  78.  
  79. <asp:Label ID="lblError" runat="server" Text=""></asp:Label>
  80.  
  81. </form>
  82. </body>
  83. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement