FormattedString 类
Renders a string formatted with .Net Composite Formatting.
继承层次结构
System.Object
System.Web.UI.Control
Microsoft.SharePoint.WebControls.SPControl
Microsoft.SharePoint.WebControls.FormattedString
命名空间: Microsoft.SharePoint.WebControls
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
Public NotInheritable Class FormattedString _
Inherits SPControl
用法
Dim instance As FormattedString
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class FormattedString : SPControl
备注
FormatText属性包含基础的.Net复合格式化的字符串可能包含占位符,如"{0}"或"{1:hh}"。这些是通过Render方法替换为实际值。
继承的**Control()**属性包含子其ToString方法提供将替换FormatText属性中的占位符的实际值的控件。**Control()**属性中的子控件的索引顺序确定它取代了哪些占位符。
线程安全性
该类型的任何公共 静态 (已共享 在 Visual Basic 中) 成员都是线程安全的。不保证任何实例成员都是线程安全的。