Main Page

  Previous Section Next Section


System.Web.UI.WebControls (system.web.dll)class

This class represents the text box web control and provides properties to configure text wrapping, the maximum accepted length, and the size in fixed character widths and row-heights (Columns and Rows). This class also includes a single event, TextChanged, which will fire only when the text box loses focus and a post back is generated.

The text box is abstracted away from any specific HTML element. Depending on your settings, ASP.NET will use the appropriate <input type="text">, <input type="password">, or <textarea> HTML tag.

public class TextBox : WebControl, System.Web.UI.IPostBackDataHandler {
// Public Constructors
   public TextBox( );
// Public Instance Properties
   public virtual bool AutoPostBack{set; get; }
   public virtual int Columns{set; get; }
   public virtual int MaxLength{set; get; }
   public virtual bool ReadOnly{set; get; }
   public virtual int Rows{set; get; }
   public virtual string Text{set; get; }
   public virtual TextBoxMode TextMode{set; get; }
   public virtual bool Wrap{set; get; }
// Protected Instance Properties
   protected override HtmlTextWriterTag TagKey{get; }            // overrides WebControl
// Protected Instance Methods
   protected override void AddAttributesToRender(System.Web.UI.HtmlTextWriter writer); // overrides WebControl
   protected override void AddParsedSubObject(object obj);      // overrides System.Web.UI.Control
   protected override void OnPreRender(EventArgs e);            // overrides System.Web.UI.Control
   protected virtual void OnTextChanged(EventArgs e);
   protected override void Render(System.Web.UI.HtmlTextWriter writer);   // overrides WebControl
// Events
   public event EventHandler TextChanged;


System.Object System.Web.UI.Control(System.ComponentModel.IComponent, System.IDisposable, System.Web.UI.IParserAccessor, System.Web.UI.IDataBindingsAccessor) WebControl(System.Web.UI.IAttributeAccessor) TextBox(System.Web.UI.IPostBackDataHandler)

      Previous Section Next Section