日期:2011-09-10  浏览次数:20545 次

以下为控件的主要部分 (UI 部分)
通知使用基于合成的实现的服务器控件创建它们包含的任何子控件,以便为回发或呈现做准备。
        Protected Overrides Sub CreateChildControls()Sub CreateChildControls()
            Controls.Clear()
            labPageInfo = New Label()
            labPageInfoText_01 = New Label
            labPageInfoText_01.Text = "每页"
            txtPageSize = New TextBox
            txtPageSize.ID = "txtPageSize"
            txtPageSize.Width = 66
            labPageInfoText_02 = New Label
            labPageInfoText_02.Text = "条记录"
            labPageInfoText_03 = New Label
            labPageInfoText_03.Text = "转到"
            labPageInfoText_04 = New Label
            labPageInfoText_04.Text = "页"
            txtPageIndex = New TextBox
            txtPageIndex.ID = "txtPageIndex"
            txtPageIndex.Width = 66
            ibGotoPage = New ImageButton
            ibGotoPage.ID = "ibGotoPage"
            ibGotoPage.Width = 60
            ibGotoPage.Height = 20
            AddHandler ibGotoPage.Click, AddressOf ibGotoPage_Click
            lbGotoPage = New LinkButton
            lbGotoPage.ID = "lbGotoPage"
            lbGotoPage.Text = "转到"
            AddHandler lbGotoPage.Click, AddressOf lbGotoPage_Click
            lbFirstPage = New LinkButton
            lbFirstPage.ID = "lbFirstPage"
            lbFirstPage.Text = "首页"
            AddHandler lbFirstPage.Click, AddressOf lbFirstPage_Click
            lbPrevPage = New LinkButton
            lbPrevPage.ID = "lbPrevPage"
            lbPrevPage.Text = "上页"
            AddHandler lbPrevPage.Click, AddressOf lbPrevPage_Click
            lb下一页:ASP.net 2.0 自定义控件的开发之数据分页 第三章 = New LinkButton
            lb下一页:ASP.net 2.0 自定义控件的开发之数据分页 第三章.ID = "lb下一页: 又是头疼的兼容性有关问题