You need to override the method RenderContentsor create your own LoginName element. Something like this will do the trick:
protected override void RenderContents(HtmlTextWriter writer)
{
if (string.IsNullOrEmpty(Profile.FullName))
return;
nameToDisplay = HttpUtility.HtmlEncode(Profile.FullName);
string formatExpression = this.FormatString;
if (formatExpression .Length == 0)
{
writer.Write(nameToDisplay);
}
else
{
try
{
writer.Write(string.Format(CultureInfo.CurrentCulture, formatExpression, new object[1] { nameToDisplay });
}
catch (FormatException exception)
{
throw new FormatException("Invalid FormatString", exception1);
}
}
}
Also see here a short article on working with LoginName .