System.Web.UI.DataBinder.GetIndexedPropertyValue Method

Retrieves the value of a property of the specified container and navigation path.

Syntax

public static object GetIndexedPropertyValue (object container, string expr)

Parameters

container
The object reference against which expr is evaluated. This must be a valid object identifier in the specified language for the page.
expr
The navigation path from the container object to the public property value to place in the bound control property. This must be a string of property or field names separated by periods, such as Tables[0].DefaultView.[0].Price in C# or Tables(0).DefaultView.(0).Price in Visual Basic.

Returns

An object that results from the evaluation of the data-binding expression.

Remarks

The value of expr must evaluate to a public property.

For any of the list Web controls, such as System.Web.UI.WebControls.GridView, System.Web.UI.WebControls.DetailsView, System.Web.UI.WebControls.DataList, or System.Web.UI.WebControls.Repeater, container should be Container.DataItem. If you are binding against the page, container should be Page.

Requirements

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