void Page_Load(Object sender
{
if (CheckBox
ItemsGrid
else
ItemsGrid
if (!IsPostBack)
{
start_index =
ItemsGrid
}
BindGrid();
}
/////////////邦定公用函數
void BindGrid()
{
ItemsGrid
ItemsGrid
}
///////////////////////// 數據庫的鏈 接在前面已經發表過的
<asp:DataGrid id=
BorderColor=
BorderWidth=
CellPadding=
AllowPaging=
AllowCustomPaging=
BackImageUrl=
AutoGenerateColumns=
OnPageIndexChanged=
//分頁默認樣式
<PagerStyle NextPageText=
PrevPageText=
Position=
PageButtonCount=
BackColor=
</PagerStyle>
<AlternatingItemStyle BackColor=
</AlternatingItemStyle>
<HeaderStyle BackColor=
</HeaderStyle>
<Columns>
<asp:BoundColumn HeaderText=
DataField=
<asp:BoundColumn
HeaderText=
DataField=
<asp:BoundColumn
HeaderText=
DataField=
DataFormatString=
<ItemStyle HorizontalAlign=
</ItemStyle>
</asp:BoundColumn>
</Columns>
</asp:DataGrid>
<br>
//選擇數字顯示分頁
<asp:CheckBox id=
Text =
AutoPostBack=
runat=
From:http://tw.wingwit.com/Article/program/net/201311/13755.html