i was used with php to use printf to build my strings, but i cannot find anything similar with asp and i end up writing crap like:
WrapTag="<"&Tag&">"&Text&" </"&Tag&">"
instead i would liek to write something more readable, like:
WrapTag=String.Format("<{0}>{1}</{2}>",Tag,Text,Tag)
as it was shown with this url:
http://idunno.org/archive/2004/07/14/122.aspx but it is not working.
Can anyone help me on that?
The code that you show is correct.
You don’t have to send in the tag name twice, you can use the same value twice in the format: