This documentation is archived and is not being maintained.

FormattedString Class

Renders a string formatted with .Net Composite Formatting.


Namespace:  Microsoft.SharePoint.WebControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class FormattedString : SPControl

The FormatText property holds the foundational .Net composite formatted string that may contain placeholders such as "{0}" or "{1:hh}". These are replaced by actual values by the Render(HtmlTextWriter) method.

The inherited Control() property holds the child controls whose ToString methods provide the actual values that will replace the placeholders in the FormatText property. The index order of a child control in the Control() property determines which placeholder it replaces.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.