Back to ASP.NET Web Forms land! SharePoint includes a handy control, FormattedString, that can be used to render the contents of its child controls as specified in a format string; pretty much what String.Format does. I wanted to do the same with plain old ASP.NET Web Forms, and here’s what I came up with:
Key points are:
Of course, you should only use FormattedControl with controls that return string literals, otherwise, you will probably get a lot of garbage in the output.