ImageField.GetValue Method

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

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

protected virtual Object GetValue(
	Control controlContainer,
	string fieldName,
	ref PropertyDescriptor cachedDescriptor


Type: System.Web.UI.Control

The Control that contains the field value.

Type: System.String

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

Type: System.ComponentModel.PropertyDescriptor

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

Return Value

Type: System.Object
The value of the specified field.


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.

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.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft