แก้ไข

แชร์ผ่าน


ImageField.GetValue(Control, String, PropertyDescriptor) Method

Definition

Retrieves the value of the specified field from the specified control.

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

Parameters

controlContainer
Control

The Control that contains the field value.

fieldName
String

The name of the field for which to retrieve the value.

cachedDescriptor
PropertyDescriptor

A PropertyDescriptor, passed by reference, that represents the properties of the field.

Returns

The value of the specified field.

Exceptions

The controlContainer parameter is null.

-or-

The data item associated with the container control is null.

-or-

The field specified by the fieldName parameter could not be found.

Remarks

The GetValue method is a helper method used by the ImageField object to determine the value of the specified field.

Notes to Inheritors

When extending the ImageField object, you can override this method to provide custom routine to determine a field's value.

Applies to

See also