I need to display a welcome message on a webpage. I'd like to have the text of the message saved within the Web.Config file. The text will contain line breaks.
e.g.
<appSettings>
<add key="Test" value="Hello
There
How are you?"/>
</appSettings>
However when I display this it all goes back on 1 line.
Can anybody help?
I'm using ASP.Net 4.0
Thanks in advance
You can do it as Niek said but I prefer the Constants to be in your Application: App_GlobalResources or App_LocalResources.
Then you can have multiple languages support and everything clean... but if you dont want to rebuild every time you change in the constants then you can put the text in the database or xml file.
Appsettings in web.config are more for settings in an application