System.Web.UI.DataBinder.GetIndexedPropertyValue Method

Retrieves the value of the specified property for the specified container, and then formats the results.

Syntax

public static string GetIndexedPropertyValue (object container, string expr, string format)

Parameters

expr
a string
container
The object reference against which the expression is evaluated. This must be a valid object identifier in the specified language for the page.
format
A string that specifies the format in which to display the results.

Returns

The value of the specified property in the format specified by format.

Remarks

The DataBinder.GetIndexedPropertyValue(object, string, string) method invokes the DataBinder.GetIndexedPropertyValue(object, string) method, and then uses the string.Format(string, object) method to format the result as specified in the format parameter. A .NET Framework format string (like those used by string.Format(string, object)) converts the object instance returned by the data-binding expression to a string object.

Exceptions that are thrown for the DataBinder.GetIndexedPropertyValue(object, string) method apply to the DataBinder.GetIndexedPropertyValue(object, string, string) method as well.

Requirements

Namespace: System.Web.UI
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0