---
title: "ConfigurationManager.AppSettings convert “\\n” to “\\\\n” why?"  
description: "ConfigurationManager.AppSettings convert “\\n” to “\\\\n” why?"  
author: "Anonymous User"  
published: 2014-08-22  
updated: 2014-08-22  
canonical: https://www.mindstick.com/forum/2093/configurationmanager-appsettings-convert-n-to-n-why  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 1 minute  

---

# ConfigurationManager.AppSettings convert “\n” to “\\n” why?

I have a AppSetting in web.config.

<[add](https://www.mindstick.com/forum/12983/add-address-in-textbox-when-page-is-load-and-if-i-search-address-in-textbox-show-in-map-by-javascript) key="key" [value](https://www.mindstick.com/articles/23219/an-optimized-description-adds-value-to-experience-and-in-turn-effectively-guest-posting-packages)="\n|\r"/>

When i read it by [ConfigurationManager.AppSettings](https://www.mindstick.com/forum/1904/using-values-from-appconfig-file-in-c-sharp)["key"] it gives "\\n|\\r". Why ?

## Replies

### Reply by Sumit Kesarwani

Hi Jacob, try this:\

ConfigurationManager.AppSettings["Key"].Replace("\\n", "\n")


---

Original Source: https://www.mindstick.com/forum/2093/configurationmanager-appsettings-convert-n-to-n-why

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
