This documentation is archived and is not being maintained.
DataBinder::GetIndexedPropertyValue Method (Object, String)
Visual Studio 2010
Retrieves the value of a property of the specified container and navigation path.
Assembly: System.Web (in System.Web.dll)
Parameters
- container
- Type: System::Object
The object reference against which expr is evaluated. This must be a valid object identifier in the specified language for the page.
- expr
- Type: System::String
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.
Return Value
Type: System::ObjectAn object that results from the evaluation of the data-binding expression.
| Exception | Condition |
|---|---|
| ArgumentNullException | container is nullptr. - or - expr is nullptr or an empty string (""). |
| ArgumentException | expr is not a valid indexed expression. - or - expr does not allow indexed access. |
The value of expr must evaluate to a public property.
For any of the list Web controls, such as GridView, DetailsView, DataList, or Repeater, container should be Container.DataItem. If you are binding against the page, container should be Page.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: