| 1 |
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MyPage.aspx.cs" Inherits="MyPage" EnableViewState="false" %> |
| 2 |
|
| 3 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 4 |
|
| 5 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
| 6 |
<head id="Head1" runat="server"> |
| 7 |
<title>Untitled Page</title> |
| 8 |
</head> |
| 9 |
<body> |
| 10 |
<form id="form1" runat="server"> |
| 11 |
<div> |
| 12 |
<%= MonoTests.stand_alone.WebHarness.HtmlDiff.BEGIN_TAG %><asp:ListView ID="ListViewTest" DataSourceID="ObjectDataSource1" runat="server" > |
| 13 |
<ItemTemplate><%# Container.DataItem %> </ItemTemplate> |
| 14 |
<LayoutTemplate> |
| 15 |
<div runat="server" id="itemPlaceHolder"></div> |
| 16 |
</LayoutTemplate> |
| 17 |
</asp:ListView> |
| 18 |
<asp:DataPager runat="server" ID="DataPager1" PagedControlID="ListViewTest"> |
| 19 |
<Fields> |
| 20 |
<asp:NextPreviousPagerField ButtonType="Link" ShowFirstPageButton="true" |
| 21 |
ShowLastPageButton="false" ShowNextPageButton="false" ShowPreviousPageButton="true"/> |
| 22 |
<asp:NumericPagerField ButtonCount="5" /> |
| 23 |
<asp:NextPreviousPagerField ButtonType="Link" ShowFirstPageButton="false" |
| 24 |
ShowLastPageButton="true" ShowNextPageButton="true" ShowPreviousPageButton="false" /> |
| 25 |
</Fields> |
| 26 |
</asp:DataPager><%= MonoTests.stand_alone.WebHarness.HtmlDiff.END_TAG %> |
| 27 |
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" EnablePaging="True" |
| 28 |
SelectMethod="GetData" SelectCountMethod="GetCount"> |
| 29 |
</asp:ObjectDataSource> |
| 30 |
</div> |
| 31 |
<script runat="server" type="text/C#"> |
| 32 |
protected void Page_LoadComplete(object sender, EventArgs e) |
| 33 |
{ |
| 34 |
ObjectDataSource1.TypeName = this.GetType().AssemblyQualifiedName; |
| 35 |
} |
| 36 |
public int[] GetData(int startRowIndex, int maximumRows) |
| 37 |
{ |
| 38 |
int[] ret = new int[13]; |
| 39 |
for (int i = 0; i < 13; i++) |
| 40 |
ret [i] = startRowIndex + i; |
| 41 |
return ret; |
| 42 |
} |
| 43 |
|
| 44 |
public int GetCount() |
| 45 |
{ |
| 46 |
return GetData(0, 13).Length; |
| 47 |
} |
| 48 |
</script> |
| 49 |
</form> |
| 50 |
</body> |
| 51 |
</html> |