The value of expression must evaluate to a public property.
For more information about format strings in the .NET Framework, see Formatting Overview.
This method is automatically called when you create data bindings in a rapid application development (RAD) designer such as Visual Studio. You can also use it declaratively to convert the Object resulting from the data-binding expression to a String. To use the method declaratively, use the <%# %> expression syntax, as used in standard ASP.NET data binding.
This method is particularly useful when binding data to controls that are in a templated list.
Note: |
|---|
Because this method performs late-bound evaluation, using reflection at run time, it can cause performance to noticeably slow compared to standard ASP.NET data-binding syntax. Use this method judiciously, particularly when string formatting is not required.
|
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.