We help IT Professionals succeed at work.
Get Started

Ampersand in Web.Config appSettings

Last Modified: 2012-05-09
I am using the AppSettings section of my Web.Config file to link a URL with a key value.  It works perfectly for every url I have except when an ampersand (&) is contained in the key value or url.  Does anyone know a way around this?  I have done a little research and have found suggestions to use & in place of the ampersand but that does not seem to work.  Any idea? Thanks.
<add key="RegScreen23" value="http://testurl/winmobile/MrPerformanceFuel_bb.asp"/>
    <add key="RegKey23" value="Meramec Performance Fuel"/>
    <add key="RegScreen24" value="http://testurl/winmobile/MrChemOverview1&amp;2_bb.asp"/>
    <add key="RegKey24" value="Meramec U1&amp;2 Chemistry"/>
    <add key="RegScreen25" value="http://testurl/winmobile/MrChemOverview3&amp;4_bb.asp"/>
    <add key="RegKey25" value="Meramec U3&amp;4 Chemistry"/>

Open in new window

Watch Question
This problem has been solved!
Unlock 2 Answers and 14 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE