Say if I want to compose the following client-side javascript with a dynamic
value in it:
function IsThisAlright(value)
{
return value != dynamicnumber;
}
... in which "dynamicnumber" is generated on the server side at runtime.
If I use the String.Format() to construct this script and inserting the
dynamic value, how do I escape the curly braces?
This is driving me nuts. I can't local this elementary bit of information
in the documentation!
Please help. Thanks in advance.
"{{ <{0}> }}"
And you pass "hi" as the first parameter, it will come out as:
{ <hi> }
-glenn-
"Tony Chow" <ever...@ucla.edu> wrote in message
news:e$YchNQACHA.1092@tkmsftngp02...
So, you would use Console.WriteLine("This is a curly bracket \{"); to print
a left curly.
In your VS.NET IDE help you can find more info at:
ms-help://MS.VSCC/MS.MSDNVS/cpgenref/html/xsdrefsinglecharacterescape.htm
--
Greg
http://www.claritycon.com/
"Tony Chow" <ever...@ucla.edu> wrote in message
news:e$YchNQACHA.1092@tkmsftngp02...
The help section you reference is for an XML Schema Regular Expression where
I think you can escape curly braces as you can with "regular" Regular
Expressions.
-glenn-
"Greg Ewing" <gewing@_NO_SPAM_claritycon.com> wrote in message
news:#pgp1WQACHA.2284@tkmsftngp02...
--
Greg
http://www.claritycon.com/
"-glenn-" <som...@example.com> wrote in message
news:Org$6LRACHA.1648@tkmsftngp02...