DataBinder::GetIndexedPropertyValue Method (Object, String, String)
Retrieves the value of the specified property for the specified container, and then formats the results.
Assembly: System.Web (in System.Web.dll)
public: static String^ GetIndexedPropertyValue( Object^ container, String^ propName, String^ format )
Parameters
- container
- Type: System::Object
The object reference against which the expression is evaluated. This must be a valid object identifier in the specified language for the page.
- 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.
The GetIndexedPropertyValue method invokes the GetIndexedPropertyValue method, and then uses the String::Format method to format the result as specified in the format parameter. A .NET Framework format string (like those used by String::Format) converts the Object instance returned by the data-binding expression to a String object.
Exceptions that are thrown for the GetIndexedPropertyValue method apply to the GetIndexedPropertyValue method as well.
The following code example demonstrates how to use the GetIndexedPropertyValue method declaratively to bind to an indexed value.
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.