Home All Groups Group Topic Archive Search About

Web Config and regular string literal

Author
16 Dec 2005 3:26 PM
seal
I am trying to keep the body of an email message in the web.config, something
like
"We have received ..... blah.. blah.. \n Thank you, \n ... some whitty
closing line".

Anyway, when I read this it is always coming back as a verbatim string
literal and the email contains the escape chars (\n). How can I make this a
regular string literal so that the email body will recognize the escape
characters?

Thank you

Author
16 Dec 2005 4:13 PM
seal
I love replying to my own post.

somestring.Replace(@"\n",Convert.ToChar(10).ToString())

Fixed it. Thanks gotdotnet

Show quote
"seal" wrote:

> I am trying to keep the body of an email message in the web.config, something
> like
> "We have received ..... blah.. blah.. \n Thank you, \n ... some whitty
> closing line".
>
> Anyway, when I read this it is always coming back as a verbatim string
> literal and the email contains the escape chars (\n). How can I make this a
> regular string literal so that the email body will recognize the escape
> characters?
>
> Thank you

AddThis Social Bookmark Button