-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDetailstotable.aspx
82 lines (79 loc) · 2.9 KB
/
Detailstotable.aspx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Detailstotable.aspx.cs" Inherits="ApplicationState.Detailstotable" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Details to table</title>
<link rel="icon" href="./img/Dotnet.png" />
<style>
body {
background-color: #eceff1;
}
table {
margin-top: 20px;
border-collapse: collapse;
width: 100%;
}
table, th, td {
border: 1px solid black;
padding: 10px;
text-align: left;
}
th {
background-color: #f2f2f2;
}
</style>
</head>
<body>
<div class="container" runat="server">
<form id="form1" runat="server">
<div>
<asp:Label AssociatedControlID="Name" Text="Name:" runat="server"></asp:Label>
<asp:TextBox ID="Name" runat="server"></asp:TextBox>
</div>
<div>
<asp:Label AssociatedControlID="Address" Text="Address:" runat="server"></asp:Label>
<asp:TextBox ID="Address" runat="server"></asp:TextBox>
</div>
<div>
<asp:Label AssociatedControlID="Age" Text="Age:" runat="server"></asp:Label>
<asp:TextBox ID="Age" runat="server"></asp:TextBox>
</div>
<div class="gender" runat="server">
<asp:Label Text="Gender:" runat="server"></asp:Label><br />
<asp:RadioButton ID="rdoMale" GroupName="GenderGroup" Text="Male" runat="server" />
<asp:RadioButton ID="rdoFemale" GroupName="GenderGroup" Text="Female" runat="server" />
</div>
<div>
<asp:Button ID="SubmitButton" Text="Save" runat="server" OnClick="SubmitButton_Click" />
</div>
</form>
<!-- Table output -->
<div class="table" runat="server">
<table>
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Address</th>
<th>Age</th>
<th>Gender</th>
</tr>
</thead>
<tbody>
<asp:Repeater ID="DetailsRepeater" runat="server">
<ItemTemplate>
<tr>
<td><%# Eval("ID") %></td>
<td><%# Eval("Name") %></td>
<td><%# Eval("Address") %></td>
<td><%# Eval("Age") %></td>
<td><%# Eval("Gender") %></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</tbody>
</table>
</div>
</div>
</body>
</html>