Share via


ImageField.GetValue(Control, String, PropertyDescriptor) 方法

定義

從指定的控制項中擷取指定的欄位值。

protected:
 virtual System::Object ^ GetValue(System::Web::UI::Control ^ controlContainer, System::String ^ fieldName, System::ComponentModel::PropertyDescriptor ^ % cachedDescriptor);
protected virtual object GetValue (System.Web.UI.Control controlContainer, string fieldName, ref System.ComponentModel.PropertyDescriptor cachedDescriptor);
abstract member GetValue : System.Web.UI.Control * string * PropertyDescriptor -> obj
override this.GetValue : System.Web.UI.Control * string * PropertyDescriptor -> obj
Protected Overridable Function GetValue (controlContainer As Control, fieldName As String, ByRef cachedDescriptor As PropertyDescriptor) As Object

參數

controlContainer
Control

包含欄位值的 Control

fieldName
String

要擷取其值的欄位名稱。

cachedDescriptor
PropertyDescriptor

以傳址方式傳遞的 PropertyDescriptor,表示欄位的屬性。

傳回

Object

指定的欄位值。

例外狀況

controlContainer 參數為 null

-或- 與容器控制項關聯的資料項目為 null

-或- 找不到 fieldName 參數所指定的欄位。

備註

方法是 GetValue 物件用來 ImageField 判斷指定欄位值的協助程式方法。

給繼承者的注意事項

擴充 ImageField 物件時,您可以覆寫這個方法,以提供自訂常式來判斷域的值。

適用於

另請參閱