本文整理匯總了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("共 "));
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);
//.........這裏部分代碼省略.........