DynamicField DynamicField DynamicField DynamicField Class

定義

表示在使用 ASP.NET Dynamic Data 功能的資料繫結控制項中顯示的資料欄位。Represents a data field that is displayed in a data-bound control that uses ASP.NET Dynamic Data features.

public ref class DynamicField : System::Web::UI::WebControls::DataControlField, System::Web::DynamicData::IFieldFormattingOptions, System::Web::UI::IAttributeAccessor
public class DynamicField : System.Web.UI.WebControls.DataControlField, System.Web.DynamicData.IFieldFormattingOptions, System.Web.UI.IAttributeAccessor
type DynamicField = class
    inherit DataControlField
    interface IAttributeAccessor
    interface IFieldFormattingOptions
Public Class DynamicField
Inherits DataControlField
Implements IAttributeAccessor, IFieldFormattingOptions
繼承
實作

範例

請參閱這項功能的執行階段程式碼範例:執行See a run-time code example of this feature: Run.

下列範例示範如何使用DynamicField物件中GridView控制項來顯示和編輯資料庫資料表中的值。The following example demonstrates how to use the DynamicField object in a GridView control to display and edit values from a database table.

<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
  protected void Page_Init(object sender, EventArgs e)
  {
    DynamicDataManager1.RegisterControl(CustomersGridView);
  }
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <title>DynamicField Sample</title>
  <link href="~/Site.css" rel="stylesheet" type="text/css" />
</head>
<body>
  <form id="form1" runat="server">
    <div>
    
      <h2><%= CustomersDataSource.TableName%> Table</h2>
      
      <asp:DynamicDataManager ID="DynamicDataManager1" runat="server"
        AutoLoadForeignKeys="true" />
        
      <asp:ValidationSummary ID="ValidationSummary1" runat="server" EnableClientScript="true" 
        HeaderText="List of validation errors"  />
      <asp:DynamicValidator runat="server" ID="DynamicValidator1"
        ControlToValidate="CustomersGridView" Display="None" />
        
      <asp:GridView ID="CustomersGridView" runat="server"
        AutoGenerateColumns="false"
        AutoGenerateEditButton="true"
        AutoGenerateDeleteButton="true"
        DataSourceID="CustomersDataSource"
        AllowPaging="true"
        AllowSorting="true"
        CssClass="gridview">
        <Columns>
          <asp:DynamicField DataField="CustomerID" />
          <asp:DynamicField DataField="FirstName" />
          <asp:DynamicField DataField="LastName" />
        </Columns>        
      </asp:GridView>

      <!-- This example uses Microsoft SQL Server and connects   -->
      <!-- to the AdventureWorksLT sample database.              -->
      <asp:LinqDataSource ID="CustomersDataSource" runat="server" 
        TableName="Customers"
        ContextTypeName="AdventureWorksLTDataContext"
        EnableUpdate="true"
        EnableDelete="true" >
      </asp:LinqDataSource>
      
    </div>
  </form>
</body>
</html>
<%@ Page Language="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
  
  Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs)    
    DynamicDataManager1.RegisterControl(CustomersGridView)
  End Sub
  
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <title>DynamicField Sample</title>
  <link href="~/Site.css" rel="stylesheet" type="text/css" />
</head>
<body>
  <form id="form1" runat="server">
    <div>
    
      <h2><%= CustomersDataSource.TableName%> Table</h2>
      
      <asp:DynamicDataManager ID="DynamicDataManager1" runat="server"
        AutoLoadForeignKeys="true" />
        
      <asp:ValidationSummary ID="ValidationSummary1" runat="server" EnableClientScript="true" 
        HeaderText="List of validation errors"  />
      <asp:DynamicValidator runat="server" ID="DynamicValidator1"
        ControlToValidate="CustomersGridView" Display="None" />
        
      <asp:GridView ID="CustomersGridView" runat="server"
        AutoGenerateColumns="false"
        AutoGenerateEditButton="true"
        AutoGenerateDeleteButton="true"
        DataSourceID="CustomersDataSource"
        AllowPaging="true"
        AllowSorting="true"
        CssClass="gridview">
        <Columns>
          <asp:DynamicField DataField="CustomerID" />
          <asp:DynamicField DataField="FirstName" />
          <asp:DynamicField DataField="LastName" />
        </Columns>        
      </asp:GridView>

      <!-- This example uses Microsoft SQL Server and connects   -->
      <!-- to the AdventureWorksLT sample database.              -->
      <asp:LinqDataSource ID="CustomersDataSource" runat="server" 
        TableName="Customers"
        ContextTypeName="AdventureWorksLTDataContext"
        EnableUpdate="true"
        EnableDelete="true" >
      </asp:LinqDataSource>
      
    </div>
  </form>
</body>
</html>

備註

本主題內容:In this topic:

簡介Introduction

DynamicField類別由資料繫結控制項,例如GridViewDetailsView控制項,以顯示欄位值,使用自訂的頁面中的 ASP.NET Dynamic Data 功能。The DynamicField class is used by data-bound controls, such as the GridView and DetailsView controls, to display a field value that uses ASP.NET Dynamic Data features in custom pages.

DynamicField類別會提供類似的功能BoundField類別。The DynamicField class provides functionality that resembles that of the BoundField class. 不過,因為DynamicField動態資料應用程式中使用物件,您可以利用下列的動態資料功能:However, because a DynamicField object is used in Dynamic Data applications, you can take advantage of the following Dynamic Data features:

  • 自動轉譯適當的控制項欄位使用欄位範本為基礎的資料類型。Automatically rendering the proper control for a field by using field templates, based on the data type. 整個應用程式都可以修改全域的欄位範本。The field templates can be globally modified for the entire application.

  • 提供根據資料庫結構描述的內建的資料驗證。Providing built-in data validation based on the database schema. 您也可以加入自訂資料模型的驗證類型。You can also add validation types by customizing the data model.

  • 使用資料模型中的屬性,或使用自訂的個別欄位的資料呈現UIHint屬性。Customizing data rendering for individual fields by using attributes in the data model or by using the UIHint property.

DynamicField物件使用呈現每個欄位DynamicControl控制項。The DynamicField object renders each field by using a DynamicControl control. 若要指定要顯示的資料欄位DynamicField物件,設定DataField的欄位名稱的屬性。To specify the data field to display in a DynamicField object, set the DataField property to the field name. 您也可以設定至欄位值套用的自訂格式化字串DataFormatString屬性。You can apply a custom formatting string to the field value by setting the DataFormatString property. 預設的格式化字串會套用至欄位值,將資料繫結控制項處於唯讀模式時才。By default the formatting string is applied to field values only when the data-bound control is in read-only mode. 若要將格式字串套用至顯示的資料繫結控制項處於編輯模式時的值,設定ApplyFormatInEditMode屬性設trueTo apply the formatting string to values displayed while the data-bound control is in edit mode, set the ApplyFormatInEditMode property to true. 如果欄位值是null,您可以藉由設定顯示的自訂標題NullDisplayText屬性。If a field value is null, you can display a custom caption by setting the NullDisplayText property. DynamicField物件也會自動將轉換空字串 ("") 欄位為 null 值的值,藉由設定ConvertEmptyStringToNull屬性設trueThe DynamicField object can also automatically convert empty string ("") field values to null values by setting the ConvertEmptyStringToNull property to true.

宣告式語法Declarative Syntax

<asp:DynamicField   
    AccessibleHeaderText="string"       
    ApplyFormatInEditMode="true|false"    
    ControlStyle-BackColor="color name|#dddddd"   
    ControlStyle-BorderColor="color name|#dddddd"   
    ControlStyle-BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|  
       Ridge|Inset|Outset"    
    ControlStyle-BorderWidth="size"    
    ControlStyle-CssClass="string"   
    ControlStyle-Font-Bold="true|false"   
    ControlStyle-Font-Italic="true|false"   
    ControlStyle-Font-Names="string"   
    ControlStyle-Font-Overline="true|false"    
    ControlStyle-Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium|  
       Large|X-Large|XX-Large"   
    ControlStyle-Font-Strikeout="true|false"     
    ControlStyle-Font-Underline="true|false"     
    ControlStyle-ForeColor="color name|#dddddd"     
    ControlStyle-Height="size"   
    ControlStyle-Width="size"   
    ConvertEmptyStringToNull="true|false"    
    DataField="string"   
    DataFormatString="string"     
    FooterStyle-BackColor="color name|#dddddd"   
    FooterStyle-BorderColor="color name|#dddddd"   
    FooterStyle-BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|  
       Ridge|Inset|Outset"    
    FooterStyle-BorderWidth="size"    
    FooterStyle-CssClass="string"   
    FooterStyle-Font-Bold="true|false"   
    FooterStyle-Font-Italic="true|false"   
    FooterStyle-Font-Names="string"   
    FooterStyle-Font-Overline="true|false"    
    FooterStyle-Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium|  
       Large|X-Large|XX-Large"   
    FooterStyle-Font-Strikeout="true|false"     
    FooterStyle-Font-Underline="true|false"     
    FooterStyle-ForeColor="color name|#dddddd"     
    FooterStyle-Height="size"   
    FooterStyle-Width="size"   
    FooterStyle-HorizontalAlign="Center|Justify|Left|NotSet|Right"   
    FooterStyle-VerticalAlign="Bottom|Middle|NotSet|Top"   
    FooterStyle-Wrap="true|false"     
    HeaderImageUrl="uri"  
    HeaderStyle-BackColor="color name|#dddddd"   
    HeaderStyle-BorderColor="color name|#dddddd"   
    HeaderStyle-BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|  
       Ridge|Inset|Outset"    
    HeaderStyle-BorderWidth="size"    
    HeaderStyle-CssClass="string"   
    HeaderStyle-Font-Bold="true|false"   
    HeaderStyle-Font-Italic="true|false"   
    HeaderStyle-Font-Names="string"   
    HeaderStyle-Font-Overline="true|false"    
    HeaderStyle-Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium|  
       Large|X-Large|XX-Large"   
    HeaderStyle-Font-Strikeout="true|false"     
    HeaderStyle-Font-Underline="true|false"     
    HeaderStyle-ForeColor="color name|#dddddd"     
    HeaderStyle-Height="size"   
    HeaderStyle-Width="size"   
    HeaderStyle-HorizontalAlign="Center|Justify|Left|NotSet|Right"   
    HeaderStyle-VerticalAlign="Bottom|Middle|NotSet|Top"   
    HeaderStyle-Wrap="true|false"     
    HeaderText="string"  
    InsertVisible="true|false"      
    ItemStyle-BackColor="color name|#dddddd"   
    ItemStyle-BorderColor="color name|#dddddd"   
    ItemStyle-BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|  
       Ridge|Inset|Outset"    
    ItemStyle-BorderWidth="size"    
    ItemStyle-CssClass="string"   
    ItemStyle-Font-Bold="true|false"   
    ItemStyle-Font-Italic="true|false"   
    ItemStyle-Font-Names="string"   
    ItemStyle-Font-Overline="true|false"    
    ItemStyle-Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium|  
       Large|X-Large|XX-Large"   
    ItemStyle-Font-Strikeout="true|false"     
    ItemStyle-Font-Underline="true|false"     
    ItemStyle-ForeColor="color name|#dddddd"     
    ItemStyle-Height="size"   
    ItemStyle-Width="size"   
    ItemStyle-HorizontalAlign="Center|Justify|Left|NotSet|Right"   
    ItemStyle-VerticalAlign="Bottom|Middle|NotSet|Top"   
    ItemStyle-Wrap="true|false"     
    NullDisplayText="string"   
    ReadOnly="true|false"    
    ShowHeader="true|false"    
    SortExpression="string"   
    UIHint="string"   
    ValidationGroup="string"   
    Visible="true|false"   
    />  
<asp:DynamicField />  

建構函式

DynamicField() DynamicField() DynamicField() DynamicField()

初始化 DynamicField 類別的新執行個體。Initializes a new instance of the DynamicField class.

屬性

AccessibleHeaderText AccessibleHeaderText AccessibleHeaderText AccessibleHeaderText

取得或設定在部分控制項中呈現為 AbbreviatedText 屬性值的文字。Gets or sets text that is rendered as the AbbreviatedText property value in some controls.

(Inherited from DataControlField)
ApplyFormatInEditMode ApplyFormatInEditMode ApplyFormatInEditMode ApplyFormatInEditMode

取得或設定值,這個值表示資料欄位處於編輯模式時,DataFormatString 屬性指定的格式化字串是否套用至欄位值。Gets or sets a value that indicates whether the formatted string that is specified by the DataFormatString property is applied to field value when the data field is in edit mode.

Column Column Column Column

取得與這個 MetaColumn 物件相關聯的 DynamicField 物件。Gets the MetaColumn object that this DynamicField object is associated with.

Control Control Control Control

取得與 DataControlField 物件關聯之資料控制項的參考。Gets a reference to the data control that the DataControlField object is associated with.

(Inherited from DataControlField)
ControlStyle ControlStyle ControlStyle ControlStyle

取得 DataControlField 物件內含之任何 Web 伺服器控制項的樣式。Gets the style of any Web server controls contained by the DataControlField object.

(Inherited from DataControlField)
ConvertEmptyStringToNull ConvertEmptyStringToNull ConvertEmptyStringToNull ConvertEmptyStringToNull

取得或設定值,表示在資料來源中更新資料欄位時,是否將空字串值 ("") 自動轉換為 null 值。Gets or sets a value that indicates whether empty string values ("") are automatically converted to null values when the data field is updated in the data source.

DataField DataField DataField DataField

取得或設定要繫結 DynamicField 物件的資料欄位名稱。Gets or sets the name of the data field to bind the DynamicField object to.

DataFormatString DataFormatString DataFormatString DataFormatString

取得或設定字串,這個字串指定資料欄位值的顯示格式。Gets or sets the string that specifies the display format for the value of the data field.

DesignMode DesignMode DesignMode DesignMode

取得值,指示目前是否在設計階段環境中檢視資料控制項欄位。Gets a value indicating whether a data control field is currently viewed in a design-time environment.

(Inherited from DataControlField)
FooterStyle FooterStyle FooterStyle FooterStyle

取得或設定資料控制項欄位的頁尾樣式。Gets or sets the style of the footer of the data control field.

(Inherited from DataControlField)
FooterText FooterText FooterText FooterText

取得或設定顯示在資料控制項欄位之頁尾項目中的文字。Gets or sets the text that is displayed in the footer item of a data control field.

(Inherited from DataControlField)
HeaderImageUrl HeaderImageUrl HeaderImageUrl HeaderImageUrl

取得或設定顯示在資料控制項欄位的標頭項目中之影像的 URL。Gets or sets the URL of an image that is displayed in the header item of a data control field.

(Inherited from DataControlField)
HeaderStyle HeaderStyle HeaderStyle HeaderStyle

取得或設定資料控制項欄位的標頭樣式。Gets or sets the style of the header of the data control field.

(Inherited from DataControlField)
HeaderText HeaderText HeaderText HeaderText

取得或設定資料繫結控制項 (其中含有 DynamicField 物件) 之標頭中顯示的文字。Gets or sets the text that is displayed in the header of the data-bound control that contains the DynamicField object.

HtmlEncode HtmlEncode HtmlEncode HtmlEncode

取得或設定值,這個值表示資料欄位值在 DynamicField 物件中顯示之前是否進行 HTML 編碼。Gets or sets a value that indicates whether data field values are HTML-encoded before they are displayed in a DynamicField object.

IDataSourceViewSchemaAccessor.DataSourceViewSchema IDataSourceViewSchemaAccessor.DataSourceViewSchema IDataSourceViewSchemaAccessor.DataSourceViewSchema IDataSourceViewSchemaAccessor.DataSourceViewSchema

取得或設定與此 DataControlField 物件相關聯的結構描述。Gets or sets the schema associated with this DataControlField object.

(Inherited from DataControlField)
InsertVisible InsertVisible InsertVisible InsertVisible

取得值,指示 DataControlField 物件在其父資料繫結控制項處於插入模式時是否可見。Gets a value indicating whether the DataControlField object is visible when its parent data-bound control is in insert mode.

(Inherited from DataControlField)
IStateManager.IsTrackingViewState IStateManager.IsTrackingViewState IStateManager.IsTrackingViewState IStateManager.IsTrackingViewState

取得值,指出 DataControlField 物件是否正在將變更儲存到它的檢視狀態。Gets a value indicating whether the DataControlField object is saving changes to its view state.

(Inherited from DataControlField)
IsTrackingViewState IsTrackingViewState IsTrackingViewState IsTrackingViewState

取得值,指出 DataControlField 物件是否正在將變更儲存到它的檢視狀態。Gets a value indicating whether the DataControlField object is saving changes to its view state.

(Inherited from DataControlField)
ItemStyle ItemStyle ItemStyle ItemStyle

取得由資料控制項欄位顯示之任何文字基礎內容的樣式。Gets the style of any text-based content displayed by a data control field.

(Inherited from DataControlField)
NullDisplayText NullDisplayText NullDisplayText NullDisplayText

取得或設定資料欄位值為 null 時該欄位所顯示的標題。Gets or sets the caption that is displayed for a data field when the field value is null.

ReadOnly ReadOnly ReadOnly ReadOnly

取得動態欄位的唯讀狀態。Gets the read-only state of the dynamic field.

ShowHeader ShowHeader ShowHeader ShowHeader

取得或設定值,指示是否呈現資料控制項欄位的標頭項目。Gets or sets a value indicating whether the header item of a data control field is rendered.

(Inherited from DataControlField)
SortExpression SortExpression SortExpression SortExpression

取得或設定資料欄位做為資料來源排序依據時使用的排序運算式。Gets or sets the sort expression that is used when the data field is used to sort the data source by.

UIHint UIHint UIHint UIHint

取得或設定要用於顯示資料欄位的欄位樣板。Gets or sets the field template to use for displaying the data field.

ValidateRequestMode ValidateRequestMode ValidateRequestMode ValidateRequestMode

取得或設定值,這個值會指定控制項是否驗證用戶端輸入。Gets or sets a value that specifies whether the control validates client input.

ValidationGroup ValidationGroup ValidationGroup ValidationGroup

取得與這個 ValidationGroup 物件相關聯的 DynamicField 物件。Gets the ValidationGroup object that this DynamicField object is associated with.

ViewState ViewState ViewState ViewState

取得狀態資訊的字典,允許您在相同頁面的多個要求之間,儲存和還原 DataControlField 物件的檢視狀態。Gets a dictionary of state information that allows you to save and restore the view state of a DataControlField object across multiple requests for the same page.

(Inherited from DataControlField)
Visible Visible Visible Visible

取得或設定值,指示是否呈現資料控制項欄位。Gets or sets a value indicating whether a data control field is rendered.

(Inherited from DataControlField)

方法

CloneField() CloneField() CloneField() CloneField()

建立目前 DataControlField 衍生物件的複本。Creates a duplicate copy of the current DataControlField-derived object.

(Inherited from DataControlField)
ConfigureDynamicControl(DynamicControl) ConfigureDynamicControl(DynamicControl) ConfigureDynamicControl(DynamicControl) ConfigureDynamicControl(DynamicControl)

提供機制以修改 DynamicControl 方法建立的 InitializeCell(DataControlFieldCell, DataControlCellType, DataControlRowState, Int32) 物件。Provides a mechanism to modify a DynamicControl object that was created by the InitializeCell(DataControlFieldCell, DataControlCellType, DataControlRowState, Int32) method.

CopyProperties(DataControlField) CopyProperties(DataControlField) CopyProperties(DataControlField) CopyProperties(DataControlField)

將目前 DynamicField 物件的屬性複製到指定的 DataControlField 物件。Copies the properties of the current DynamicField object to the specified DataControlField object.

CreateDynamicControl() CreateDynamicControl() CreateDynamicControl() CreateDynamicControl()

提供機制,讓衍生自 DynamicField 的類別覆寫建立 DynamicControl 物件的方式。Provides a mechanism for classes that derive from DynamicField to override how a DynamicControl object is created.

CreateField() CreateField() CreateField() CreateField()

建立並傳回 DynamicField 類別的新執行個體。Creates and returns a new instance of the DynamicField class.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
ExtractValuesFromCell(IOrderedDictionary, DataControlFieldCell, DataControlRowState, Boolean) ExtractValuesFromCell(IOrderedDictionary, DataControlFieldCell, DataControlRowState, Boolean) ExtractValuesFromCell(IOrderedDictionary, DataControlFieldCell, DataControlRowState, Boolean) ExtractValuesFromCell(IOrderedDictionary, DataControlFieldCell, DataControlRowState, Boolean)

從目前資料表儲存格擷取資料欄位的值,並將值加入指定的字典中。Extracts the value of the data field from the current table cell and adds the value to the specified dictionary.

GetAttribute(String) GetAttribute(String) GetAttribute(String) GetAttribute(String)

擷取指定的屬性值。Retrieves the specified attribute value.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
Initialize(Boolean, Control) Initialize(Boolean, Control) Initialize(Boolean, Control) Initialize(Boolean, Control)

執行資料控制項欄位的基本執行個體初始化。Performs basic instance initialization for a data control field.

(Inherited from DataControlField)
InitializeCell(DataControlFieldCell, DataControlCellType, DataControlRowState, Int32) InitializeCell(DataControlFieldCell, DataControlCellType, DataControlRowState, Int32) InitializeCell(DataControlFieldCell, DataControlCellType, DataControlRowState, Int32) InitializeCell(DataControlFieldCell, DataControlCellType, DataControlRowState, Int32)

將文字或控制項加入指定的儲存格中。Adds text or controls to the specified cell.

LoadViewState(Object) LoadViewState(Object) LoadViewState(Object) LoadViewState(Object)

將資料來源檢視還原成之前所儲存的檢視狀態。Restores the data source view's previously saved view state.

(Inherited from DataControlField)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
OnFieldChanged() OnFieldChanged() OnFieldChanged() OnFieldChanged()

引發 FieldChanged 事件。Raises the FieldChanged event.

(Inherited from DataControlField)
SaveViewState() SaveViewState() SaveViewState() SaveViewState()

儲存自頁面回傳至伺服器以來對 DataControlField 檢視狀態所做的變更。Saves the changes made to the DataControlField view state since the time the page was posted back to the server.

(Inherited from DataControlField)
SetAttribute(String, String) SetAttribute(String, String) SetAttribute(String, String) SetAttribute(String, String)

設定與 DynamicField 物件相關聯的屬性。Sets an attribute that is associated with the DynamicField object.

ToString() ToString() ToString() ToString()

傳回字串,表示這個 DataControlField 物件。Returns a string that represents this DataControlField object.

(Inherited from DataControlField)
TrackViewState() TrackViewState() TrackViewState() TrackViewState()

會造成 DataControlField 物件追蹤其檢視狀態變更,以將這些變更儲存在控制項的 ViewState 屬性中,並持續存取相同頁面的其他要求。Causes the DataControlField object to track changes to its view state so they can be stored in the control's ViewState property and persisted across requests for the same page.

(Inherited from DataControlField)
ValidateSupportsCallback() ValidateSupportsCallback() ValidateSupportsCallback() ValidateSupportsCallback()

在衍生類別中覆寫時,表示欄位所包含的控制項支援回呼 (Callback)。When overridden in a derived class, signals that the controls contained by a field support callbacks.

(Inherited from DataControlField)

明確介面實作

IStateManager.LoadViewState(Object) IStateManager.LoadViewState(Object) IStateManager.LoadViewState(Object) IStateManager.LoadViewState(Object)

將資料控制項欄位還原成先前儲存的檢視狀態。Restores the data control field's previously saved view state.

(Inherited from DataControlField)
IStateManager.SaveViewState() IStateManager.SaveViewState() IStateManager.SaveViewState() IStateManager.SaveViewState()

儲存自頁面回傳至伺服器以來對 DataControlField 檢視狀態所做的變更。Saves the changes made to the DataControlField view state since the time the page was posted back to the server.

(Inherited from DataControlField)
IStateManager.TrackViewState() IStateManager.TrackViewState() IStateManager.TrackViewState() IStateManager.TrackViewState()

會造成 DataControlField 物件追蹤其檢視狀態變更,以將這些變更儲存在控制項的 ViewState 屬性中,並持續存取相同頁面的其他要求。Causes the DataControlField object to track changes to its view state so they can be stored in the control's ViewState property and persisted across requests for the same page.

(Inherited from DataControlField)

擴充方法

ConvertEditedValue(IFieldFormattingOptions, String) ConvertEditedValue(IFieldFormattingOptions, String) ConvertEditedValue(IFieldFormattingOptions, String) ConvertEditedValue(IFieldFormattingOptions, String)

針對已驗證的控制項傳回使用者提供的值。Returns the value provided by a user for a control that is being validated.

FormatEditValue(IFieldFormattingOptions, Object) FormatEditValue(IFieldFormattingOptions, Object) FormatEditValue(IFieldFormattingOptions, Object) FormatEditValue(IFieldFormattingOptions, Object)

以指定的格式化選項來進行格式化指定的欄位值。Formats the specified field value by using the specified formatting options.

FormatValue(IFieldFormattingOptions, Object) FormatValue(IFieldFormattingOptions, Object) FormatValue(IFieldFormattingOptions, Object) FormatValue(IFieldFormattingOptions, Object)

以指定的格式化選項來進行格式化指定的欄位值。Formats the specified field value by using the specified formatting options.

適用於

另請參閱