ASP.NET之Datalist详解(分页)
Datalist控件数据源绑定方法和GridView控件基本相似,但要显示数据需要设计控件的模版
Datalist分页源码
.apsx界面
<head runat="server">
<title></title>
<style type="text/css">
.style3
{
width: 19px;
}
.style5
{
width: 157px;
}
.style7
{
width: 133px;
}
.style8
{
width: 294px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<table border="0" cellpadding="0" cellspacing="0"
style="width: 653px">
<tr>
<td align="left">
<asp:DataList ID="DataList1" runat="server" style="margin-right: 5px"
Width="575px" onitemcommand="DataList1_ItemCommand"
onitemdatabound="DataList1_ItemDataBound" BackColor="LightGoldenrodYellow"
BorderColor="Tan" BorderWidth="1px" CellPadding="2" ForeColor="Black">
<HeaderStyle BackColor="Tan" Font-Bold="True" />
<ItemTemplate>
<table>
<tr style="border-bottom-style: groove; border-bottom-width: medium; border-bottom-color: #FFFFFF">
<td rowspan="3" align="center" class="style3">
<a href='#'>
<img border="0" height="80"
src='images/showimg.gif'
width="80"> </img> </a>
</td>
<td align="left" class="style8">
<asp:Image ID="Image4" runat="server" ImageUrl="~/images/ico2.gif" />
<a><%#Eval("bg_name")%></a>
</td>
<td align="left" class="style7">
</td>
<td class="style5">
</td>
</tr>
<tr>
<td align="left" class="style8">
空间主人:<a><%#Eval("bg_name") %></a></td>
&n
补充:Web开发 , ASP.Net ,