当前位置: 首页>>代码示例>>C#>>正文


C# TextBox.ApplyStyleSheetSkin方法代码示例

本文整理汇总了C#中System.Web.UI.WebControls.TextBox.ApplyStyleSheetSkin方法的典型用法代码示例。如果您正苦于以下问题:C# TextBox.ApplyStyleSheetSkin方法的具体用法?C# TextBox.ApplyStyleSheetSkin怎么用?C# TextBox.ApplyStyleSheetSkin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Web.UI.WebControls.TextBox的用法示例。


在下文中一共展示了TextBox.ApplyStyleSheetSkin方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateCustomPagerRow

        /// <summary>
        /// 创建自定义分页导航
        /// </summary>
        /// <param name="e">GridViewRowEventArgs,它包含事件数据</param>
        private void CreateCustomPagerRow(GridViewRowEventArgs e)
        {
            e.Row.Cells[0].Controls.Clear();

            #region 显示: 共 234 篇文章

            e.Row.Cells[0].Controls.Add(new LiteralControl("共&nbsp;"));

            Label LblRowsCount = new Label();
            LblRowsCount.ID = "LblRowsCount";
            LblRowsCount.Text = VirtualItemCount.ToString();
            LblRowsCount.Font.Bold = true;

            e.Row.Cells[0].Controls.Add(LblRowsCount);

            e.Row.Cells[0].Controls.Add(new LiteralControl("&nbsp;" + this.ItemUnit + this.ItemName));
            e.Row.Cells[0].Controls.Add(new LiteralControl("&nbsp;&nbsp;"));

            #endregion

            #region 显示: 首页 上一页 下一页 尾页

            LinkButton LbtnFirst = new LinkButton();
            LbtnFirst.CommandName = "Page";
            LbtnFirst.CommandArgument = "First";
            LbtnFirst.Enabled = !(this.PageIndex == 0);
            LbtnFirst.Text = "首页";
            e.Row.Cells[0].Controls.Add(LbtnFirst);
            e.Row.Cells[0].Controls.Add(new LiteralControl("&nbsp;"));

            LinkButton LbtnPrev = new LinkButton();
            LbtnPrev.CommandName = "Page";
            LbtnPrev.CommandArgument = "Prev";
            LbtnPrev.Enabled = !(this.PageIndex == 0);
            LbtnPrev.Text = "上一页";
            e.Row.Cells[0].Controls.Add(LbtnPrev);
            e.Row.Cells[0].Controls.Add(new LiteralControl("&nbsp;"));

            LinkButton LbtnNext = new LinkButton();
            LbtnNext.CommandName = "Page";
            LbtnNext.CommandArgument = "Next";
            LbtnNext.Enabled = !(this.PageIndex == this.PageCount - 1);
            LbtnNext.Text = "下一页";
            e.Row.Cells[0].Controls.Add(LbtnNext);
            e.Row.Cells[0].Controls.Add(new LiteralControl("&nbsp;"));

            LinkButton LbtnLast = new LinkButton();
            LbtnLast.CommandName = "Page";
            LbtnLast.CommandArgument = "Last";
            LbtnLast.Enabled = !(this.PageIndex == this.PageCount - 1);
            LbtnLast.Text = "尾页";
            e.Row.Cells[0].Controls.Add(LbtnLast);

            e.Row.Cells[0].Controls.Add(new LiteralControl("&nbsp;&nbsp;"));

            if (IsHoldState)
            {
                LbtnFirst.Click += new EventHandler(LbtnFirst_Click);
                LbtnPrev.Click += new EventHandler(LbtnPrev_Click);
                LbtnNext.Click += new EventHandler(LbtnNext_Click);
                LbtnLast.Click += new EventHandler(LbtnLast_Click);
            }

            #endregion

            #region 显示: 页次:23/45页

            e.Row.Cells[0].Controls.Add(new LiteralControl("页次:"));

            Label LblCurrentPage = new Label();
            LblCurrentPage.Text = Convert.ToString(this.PageIndex + 1);
            LblCurrentPage.Font.Bold = true;
            LblCurrentPage.ForeColor = System.Drawing.Color.Red;
            e.Row.Cells[0].Controls.Add(LblCurrentPage);

            e.Row.Cells[0].Controls.Add(new LiteralControl("/"));

            Label LblTotalPages = new Label();
            LblTotalPages.Text = Convert.ToString(this.PageCount);
            LblTotalPages.Font.Bold = true;
            e.Row.Cells[0].Controls.Add(LblTotalPages);

            e.Row.Cells[0].Controls.Add(new LiteralControl("页"));
            e.Row.Cells[0].Controls.Add(new LiteralControl("&nbsp;&nbsp;"));

            #endregion

            #region 显示: 20 篇文章/页
            TextBox TxtMaxPerPage = new TextBox();
            TxtMaxPerPage.ApplyStyleSheetSkin(Page);
            TxtMaxPerPage.MaxLength = 3;
            TxtMaxPerPage.Width = 22;
            TxtMaxPerPage.Text = Convert.ToString(this.PageSize);
            TxtMaxPerPage.AutoPostBack = true;
            TxtMaxPerPage.TextChanged += new EventHandler(this.TxtMaxPerPage_TextChanged);
            e.Row.Cells[0].Controls.Add(TxtMaxPerPage);
//.........这里部分代码省略.........
开发者ID:djzblue,项目名称:ExamOnline,代码行数:101,代码来源:ExtendedGridView.cs


注:本文中的System.Web.UI.WebControls.TextBox.ApplyStyleSheetSkin方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。