-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDefault.aspx
83 lines (77 loc) · 2.86 KB
/
Default.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
83
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style>
.button {
width: 65px;
height: 34px;
text-align: center;
background-color: #5ba9e1;
color: #e3e3e3;
border-radius: 4px;
border: 1px solid #d3d3d3;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.buttonp {
width: 70px;
height: 34px;
color: #e3e3e3;
border-radius: 4px;
text-align: center;
background-color: #5ba9e1;
border: 1px solid #d3d3d3;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.button:hover, .buttonp:hover {
background-color: #0094ff;
color: #e5e5e5;
cursor: pointer;
box-shadow: 0 0 7px #0094ff;
}
h2 {
font-family: Verdana, Geneva, Tahoma, sans-serif;
font-size: 24px;
color: #333333;
}
.gridline{
border:1px solid #999;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2>The Example of Pagination with Datalist control </h2>
<asp:DataList ID="DataList1" runat="server" DataKeyField="num"
DataSourceID="SqlDataSource1" RepeatLayout="Flow" >
<ItemTemplate>
num:
<asp:Label ID="numLabel" runat="server" Text='<%# Eval("num") %>' />
<br />
nam:
<asp:Label ID="namLabel" runat="server" Text='<%# Eval("nam") %>' />
<br />
product:
<asp:Label ID="productLabel" runat="server" Text='<%# Eval("product") %>' />
<br />
<br />
</ItemTemplate>
<SeparatorStyle CssClass="gridline" />
</asp:DataList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:testConnectionString %>"
SelectCommand="SELECT * FROM [tb]"></asp:SqlDataSource>
<br />
<asp:Button ID="Button1" CssClass="button" runat="server" Text="First" />
<asp:Button ID="Button2" CssClass="button" runat="server" Text="Next" />
<asp:Button ID="Button3" runat="server" CssClass="buttonp" Text="Previous" />
<asp:Button ID="Button4" CssClass="button" runat="server" Text="Last" />
</div>
</form>
</body>
</html>