C#-asp:DataPager单击事件

时间:2018-11-24 00:34:35

标签: c# onclick datapager

我想要如果用户单击任何DataPager按钮,例如“ Next,1,2,3 ..,Prev”,那么应该有一个单击事件,我可以在其中更改布尔值

这是我正在编写的代码:

ASPX:

@Override
public void onClick(View view) {
    Intent intent12 = new Intent(getContext(), Cod.class);
    getContext().startActivity(intent12);
}

C#:

<asp:ListView ID="ListofEmployees" runat="server" OnPagePropertiesChanging="ListofEmployees_PagePropertiesChanging">
    <LayoutTemplate>
        <ItemTemplate>
            ...
        </ItemTemplate>
    </LayoutTemplate>
<asp:DataPager ID="lvDataPager1" runat="server" PagedControlID="ListofEmployees" PageSize="9" >
    <Fields>
        <asp:NextPreviousPagerField ButtonType="Link" ShowFirstPageButton="false" ShowPreviousPageButton="true"
                            ShowNextPageButton="false" PreviousPageText="<"  />
        <asp:NumericPagerField ButtonType="Link" NumericButtonCssClass="page-number" ButtonCount="5" />
        <asp:NextPreviousPagerField ButtonType="Link" ShowNextPageButton="true" ShowLastPageButton="false"
                            ShowPreviousPageButton="false" NextPageText=">" />
    </Fields>
</asp:DataPager>

0 个答案:

没有答案