We have a series of confirmation email text stored in the web.config of various web applications. Some web applications use VB.NET, some use C#. The text is stored as a basic string data such as
<add key="cfgRegistrationEmailConfirmation" value="Thanks for registering with us.
If you have not registered to use this service, please reply to this email."
If this string is used as-is, the email text comes through like so:
Thanks for registering with us. If you have not registered to use this service, please reply to this email.
The new lines are lost. I need to replace the text new line character with the Environment.NewLine() but am unsure how to do so. I have tried replace "\n" but this does not do anything.
What technique should I use to maintain the formatting of these strings as stored in the configuration file for both VB.NET & C#? Thanks in advance for any help or advice you can offer.