您的位置:首页 >> 编程开发 >> .NET >> 其它 >> 正文
RSS
 

datalist分页的用户控件,我公司sunYun原创,如需转载,请联系作者

http://www.rdxx.com 04年04月06日 09:14 互连网 我要投稿

关键词: 用户控件 , 公司 , 分页 , SUN , DataList , 控件 , 用户
listControl.aspx
<%@ Control Language="vb" AutoEventWireup="false" Codebehind="listControl.ascx.vb" Inherits="govoa.listControl" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
共有<asp:Label id="lblRecordCount" ForeColor="red" runat="server" />条记录  当前为<asp:Label id="lblCurrentPage" ForeColor="red" runat="server" />/<asp:Label id="lblPageCount" ForeColor="red" runat="server" />页
<asp:LinkButton id="lblPrevious" runat="server" text="上一页"></asp:LinkButton>
<asp:LinkButton id="lblNext" runat="server" text="下一页"></asp:LinkButton> 
<asp:DropDownList id="NumPerPage" runat="server" AutoPostBack="True">
    <asp:ListItem Value="5">
        5行/页</asp:ListItem>
    <asp:ListItem Value="8" Selected="True">
        8行/页</asp:ListItem>
    <asp:ListItem Value="10">
        10行/页</asp:ListItem>
    <asp:ListItem Value="15">
        15行/页</asp:ListItem>
    <asp:ListItem Value="20">
        20行/页</asp:ListItem>
    <asp:ListItem Value="25">
        25行/页</asp:ListItem>
    <asp:ListItem Value="30">
        30行/页</asp:ListItem>
    <asp:ListItem Value="35">
        35行/页</asp:ListItem>
    <asp:ListItem Value="40">
        40行/页</asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="txtPage" Runat="server" Width="30"></asp:TextBox><asp:Button ID="btnGo" Runat="server" Text="转到"></asp:Button>



listControl.aspx.vb

Imports System.Data.SqlClient
Public MustInherit Class listControl
    Inherits System.Web.UI.UserControl
    Protected WithEvents lblRecordCount As System.Web.UI.WebControls.Label
    Protected WithEvents lblCurrentPage As System.Web.UI.WebControls.Label
    Protected WithEvents lblPageCount As System.Web.UI.WebControls.Label
    Protected WithEvents lblPrevious As System.Web.UI.WebControls.LinkButton
    Protected WithEvents lblNext As System.Web.UI.WebControls.LinkButton
    Protected WithEvents NumPerPage As System.Web.UI.WebControls.DropDownList
    Protected WithEvents txtPage As System.Web.UI.WebControls.TextBox
    Protected WithEvents btnGo As System.Web.UI.WebControls.Button
    Private m_DataContainer As Repeater
    Private m_datasource As String
上一页 下一页

 
 
标签: 用户控件 , 公司 , 分页 , SUN , DataList , 控件 , 用户 打印本文
 
 
  热点搜索
 
 
 



Valid XHTML 1.0 Transitional
Copyright ©2005 - 2008 Rdxx.Com,All Rights Reserved
收藏本页
收藏本站