本文整理汇总了C#中System.Web.UI.WebControls.TextBox.AddCssClass方法的典型用法代码示例。如果您正苦于以下问题:C# TextBox.AddCssClass方法的具体用法?C# TextBox.AddCssClass怎么用?C# TextBox.AddCssClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.UI.WebControls.TextBox
的用法示例。
在下文中一共展示了TextBox.AddCssClass方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateChildControls
/// <summary>
/// Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create any child controls they contain in preparation for posting back or rendering.
/// </summary>
protected override void CreateChildControls()
{
base.CreateChildControls();
Controls.Clear();
RockControlHelper.CreateChildControls( this, Controls );
_date = new TextBox();
_date.ID = "tbDate";
_date.AddCssClass( "form-control js-datetime-date" );
Controls.Add( _date );
_time = new TextBox();
_time.ID = "tbTime";
_time.AddCssClass( "form-control js-datetime-time");
Controls.Add( _time );
_cbCurrent = new CheckBox();
_cbCurrent.ID = "cbCurrent";
_cbCurrent.AddCssClass( "js-current-datetime-checkbox" );
_cbCurrent.Text = "Current Time";
this.Controls.Add( _cbCurrent );
_nbTimeOffset = new RockTextBox();
_nbTimeOffset.ID = "nbTimeOffset";
_nbTimeOffset.Help = "Enter the number of minutes after the current time to use as the date. Use a negative number to specify minutes before.";
_nbTimeOffset.AddCssClass( "input-width-md js-current-datetime-offset" );
_nbTimeOffset.Label = "+- Minutes";
this.Controls.Add( _nbTimeOffset );
RequiredFieldValidator.ControlToValidate = _date.ID;
}