当前位置:编程学习 > asp >>

自定义分页UserControl 分享及探讨!

----------Pager.ascx-------------------------------------
<%@ Control Language="c#" AutoEventWireup="false" Codebehind="Test.Pager.ascx.cs" Inherits="Pager" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<asp:label id="lbl_PageInfo" runat="server">还未用PagerBind()方法绑定</asp:label> 
<asp:linkbutton id="btn_First" runat="server" Visible="False">首页</asp:linkbutton> <asp:linkbutton id="btn_Pre" runat="server" Visible="False">前页</asp:linkbutton> <asp:linkbutton id="btn_Next" runat="server" Visible="False">下页</asp:linkbutton> <asp:linkbutton id="btn_Last" runat="server" Visible="False">尾页</asp:linkbutton> <asp:label id="lbl_1" runat="server" Visible="False">转到</asp:label>
<asp:dropdownlist id="drop_CurPage" runat="server" AutoPostBack="True" Visible="False">
<asp:ListItem Value="0">0</asp:ListItem>
</asp:dropdownlist>
<asp:Label id="lbl_2" runat="server" Visible="False">页</asp:Label>
----------end--------------------------------------------
----------Pager.ascx.cs-------------------------------------
namespace Test
{
using System;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
/// <summary>
/// Pager 的摘要说明。
/// </summary>
public class Pager : System.Web.UI.UserControl
{
protected System.Web.UI.WebControls.LinkButton btn_First;
protected System.Web.UI.WebControls.LinkButton btn_Pre;
补充:asp教程,高级应用
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,