DataBinder.GetPropertyValue Method (Object, String)

 

Retrieves the value of the specified property of the specified object.

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

public static object GetPropertyValue(
	object container,
	string propName
)

Parameters

container
Type: System.Object

The object that contains the property.

propName
Type: System.String

The name of the property that contains the value to retrieve.

Return Value

Type: System.Object

The value of the specified property.

Exception Condition
ArgumentNullException

container is null.

-or-

propName is null or an empty string ("").

HttpException

The object in container does not have the property specified by propName.

The GetPropertyValue method is used to retrieve the value of a property in an object.

The example for DataBinder demonstrates the use of this method.

.NET Framework
Available since 1.1
Return to top
Show: