![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Escape { and } characters in config file Escape { and } characters in config fileTo: NULL Date: 7/5/2006 3:18:00 AM
I'm developing a Winforms application that reads some variable values
from a .config file(similar to XML file). Besides, I need to format the
value I read from the config file. I do it this way:
String.Format(ConfigurationManager.AppSettings["Javascript"], "6) //
Want to insert "6" value
I've got this in my .config file:
<add key ="Javascript" value="function GetKey(){key = new
Key('myKey'){0};var i = 'jjj';} " />
First, the encoding of the .config file was set to utf-8, but framework
threw me an error because didn't like single quotes. Then, I changed
the encoding to ISO-8859-1 and single quotes problem was solved. But
another problem has now appeared: don't like both { and } characters.
How can I escape { and } characters? Or maybe a neutral
encoding/escaping method that lets me read all values properly? Is
there any way I can get in my code this "as is":
function GetKey(){key = new Key('myKey')6;var i = 'jjj';}
Please don't know what else I can try........
Thanks very much in advance.
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
