private static string Tagify(object thisObj, string tag, string attribute, object[] args)
{
string str = ScriptRuntime.ToString(thisObj);
StringBuilder result = new StringBuilder();
result.Append('<');
result.Append(tag);
if (attribute != null)
{
result.Append(' ');
result.Append(attribute);
result.Append("=\"");
result.Append(ScriptRuntime.ToString(args, 0));
result.Append('"');
}
result.Append('>');
result.Append(str);
result.Append("</");
result.Append(tag);
result.Append('>');
return result.ToString();
}