DataBinder.GetPropertyValue Method (Object, String, String)
.NET Framework (current version)
Retrieves the value of the specified property of the specified object, and then formats the results.
Assembly: System.Web (in System.Web.dll)
static member GetPropertyValue : container:Object * propName:string * format:string -> string
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.
- format
-
Type:
System.String
A string that specifies the format in which to display the results.
Return Value
Type: System.StringThe value of the specified property in the format specified by format.
| 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. |
This version of the GetPropertyValue method is used to retrieve and format the value of a property in an object.
The example for DataBinder demonstrates the use of this method.
.NET Framework
Available since 1.1
Available since 1.1
Show: