本文整理汇总了C#中System.Web.UI.WebControls.DropDownList.ApplyStyleSheetSkin方法的典型用法代码示例。如果您正苦于以下问题:C# DropDownList.ApplyStyleSheetSkin方法的具体用法?C# DropDownList.ApplyStyleSheetSkin怎么用?C# DropDownList.ApplyStyleSheetSkin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.UI.WebControls.DropDownList
的用法示例。
在下文中一共展示了DropDownList.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("共 "));
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(" " + this.ItemUnit + this.ItemName));
e.Row.Cells[0].Controls.Add(new LiteralControl(" "));
#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(" "));
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(" "));
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(" "));
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(" "));
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(" "));
#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);
//.........这里部分代码省略.........