最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
用户自定义控件的应用。
时间:2022-07-02 11:59:43 编辑:袖梨 来源:一聚教程网
asp.net中的 用户自定义控件 特点 1:实现服用;2:方便创建(相对与组件)。
以下为一个分页导航条的sample, 接见于Webdiyer,相信很多人已经如雷贯耳了,我也不多介绍。本问只是简单的 练习之作,没有什么深奥的算法和架构。
----behindCode---------------------------------------------------------------------------------------------------------------
namespace GallonKit
{
using System;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
///
/// PageBar 的摘要说明。
///
public delegate void PageLocalBtn(uint index);
public class PageBar : System.Web.UI.UserControl
{
protected System.Web.UI.WebControls.LinkButton LinkButton1;
protected System.Web.UI.WebControls.LinkButton btn_fistPage;
protected System.Web.UI.WebControls.LinkButton btn_lastPage;
protected System.Web.UI.WebControls.LinkButton btn_prePage;
protected System.Web.UI.WebControls.LinkButton btn_nextPage;
protected System.Web.UI.WebControls.Label lb_PageCount;
protected System.Web.UI.WebControls.TextBox tb_pageIndex;
protected System.Web.UI.WebControls.LinkButton btn_local;
public PageLocalBtn LocalBtnClick;
以下为一个分页导航条的sample, 接见于Webdiyer,相信很多人已经如雷贯耳了,我也不多介绍。本问只是简单的 练习之作,没有什么深奥的算法和架构。
----behindCode---------------------------------------------------------------------------------------------------------------
namespace GallonKit
{
using System;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
///
/// PageBar 的摘要说明。
///
public delegate void PageLocalBtn(uint index);
public class PageBar : System.Web.UI.UserControl
{
protected System.Web.UI.WebControls.LinkButton LinkButton1;
protected System.Web.UI.WebControls.LinkButton btn_fistPage;
protected System.Web.UI.WebControls.LinkButton btn_lastPage;
protected System.Web.UI.WebControls.LinkButton btn_prePage;
protected System.Web.UI.WebControls.LinkButton btn_nextPage;
protected System.Web.UI.WebControls.Label lb_PageCount;
protected System.Web.UI.WebControls.TextBox tb_pageIndex;
protected System.Web.UI.WebControls.LinkButton btn_local;
public PageLocalBtn LocalBtnClick;
相关文章
- 蛋仔派对2周年庆前瞻在哪里 06-02
- 江南百景图测试服招募怎么玩 06-02
- 阴阳师小朋友驾到怎么玩 06-02
- 鸣潮舒云秘制凉茶配方怎么获得 06-02
- 猜一猜:古人说的“夏清侯”是以下哪种物品的别称 蚂蚁庄园6月3日答案早知道 06-02
- 以下哪种食物富含胡萝卜素,大量食用可能会皮肤变黄 蚂蚁庄园今日答案6月3日 06-02