It renders nothing if FormatText is null or empty. Look at the code:
protected override void Render(HtmlTextWriter output)
{
if (!string.IsNullOrEmpty(this.FormatText))
{
string[] args = new string[this.Controls.Count];
int index = 0;
StringBuilder sb = new StringBuilder();
HtmlTextWriter writer = new HtmlTextWriter(new StringWriter(sb, CultureInfo.InvariantCulture));
foreach (Control control in this.Controls)
{
if (!(control is LiteralControl))
{
sb.Length = 0;
control.RenderControl(writer);
writer.Flush();
args[index] = sb.ToString();
index++;
}
}
string format = null;
switch (this.EncodeMethod)
{
case SPEncodeMethod.NoEncode:
format = this.FormatText;
break;
case SPEncodeMethod.HtmlEncode:
format = SPHttpUtility.HtmlEncode(this.FormatText);
break;
case SPEncodeMethod.HtmlEncodeAllowSimpleTextFormatting:
format = SPHttpUtility.HtmlEncodeAllowSimpleTextFormatting(this.FormatText);
break;
case SPEncodeMethod.EcmaScriptStringLiteralEncode:
format = SPHttpUtility.EcmaScriptStringLiteralEncode(this.FormatText);
break;
}
output.AddAttribute(HtmlTextWriterAttribute.Id, this.ClientID);
output.RenderBeginTag(HtmlTextWriterTag.Span);
string str2 = string.Empty;
try
{
str2 = string.Format(CultureInfo.InvariantCulture, format, args);
}
catch (FormatException)
{
str2 = string.Format(CultureInfo.InvariantCulture, SPUtility.EscapeForStringFormat(format), args);
}
output.Write(str2);
output.RenderEndTag();
}
}