ASP.NET TextBox 控件
定義和用法
TextBox 控件用于創(chuàng)建用戶可輸入文本的文本框。
屬性
屬性 | 描述 | .NET |
---|---|---|
AutoCompleteType | 規(guī)定 TextBox 控件的 AutoComplete 行為。 | 2.0 |
AutoPostBack | 布爾值,規(guī)定當內(nèi)容改變時,是否回傳到服務(wù)器。默認是 false。 | 1.0 |
CausesValidation | 規(guī)定當 Postback 發(fā)生時,是否驗證頁面。 | 2.0 |
Columns | textbox 的寬度。 | 1.0 |
MaxLength | 在 textbox 中所允許的最大字符數(shù)。 | 1.0 |
ReadOnly | 規(guī)定能否改變文本框中的文本。 | 1.0 |
Rows | textbox 的高度(僅在 TextMode="Multiline" 時使用)。 | 1.0 |
runat | 規(guī)定該控件是否是服務(wù)器控件。必須設(shè)置為 "server"。 | |
TagKey | ||
Text | textbox 的內(nèi)容。 | 1.0 |
TextMode | 規(guī)定 TextBox 的行為模式(單行、多行或密碼)。 | 1.0 |
ValidationGroup | 當 Postback 發(fā)生時,被驗證的控件組。 | |
Wrap | 布爾值,指示 textbox 的內(nèi)容是否換行。 | 1.0 |
OnTextChanged | 當 textbox 中的文本被更改時,被執(zhí)行的函數(shù)的名稱。 |
Web 控件標準屬性
AccessKey, Attributes, BackColor, BorderColor, BorderStyle, BorderWidth, CssClass, Enabled, Font, EnableTheming, ForeColor, Height, IsEnabled, SkinID, Style, TabIndex, ToolTip, Width
如需完整描述,請訪問 Web 控件標準屬性。
控件標準屬性
AppRelativeTemplateSourceDirectory, BindingContainer, ClientID, Controls, EnableTheming, EnableViewState, ID, NamingContainer, Page, Parent, Site, TemplateControl, TemplateSourceDirectory, UniqueID, Visible
如需完整描述,請訪問控件標準屬性。