Geeks With Blogs

Tangible Thoughts SharePoint, MOSS? and all the other questions

Needing to spew out some javascript as a format template I ran into the issue of how do you escape a curly brace for String.Format.

Obviously \{ doesnt work.

Googling around brought me to this Forum.

Guess what a double curly brace works.

So the format string becomes

  • "function foo(){{ document.write("{0}"); }}"

 

Technorati tags: , ,

Cross-posted from tariqayad.com

Posted on Friday, July 20, 2007 11:18 PM | Back to top

Copyright © Tariq | Powered by: GeeksWithBlogs.net