0

I have this key in my AppSettings

<add key="manual" value="http://www.google.com"/>

And I want to put it in a href tag like shown underneath. I tried multiple notations that I found an online but none of them works so far. Any ideas what might work?

<a href='<%$ ConfigurationSettings.AppSettings["manual"] %>'>link</a>
  • Already answered [here](http://stackoverflow.com/questions/1559446/binding-asp-net-web-config-settings-to-aspx-file-a-href-a) for the same – Karthick Raju May 04 '17 at 08:55
  • Already stumbled upon that but it didn't work. Though I found the problem since everyone's convinced this should definitely work. The problem was I made the a-tag in a translation file (because the website is in 3 languages and the word "link" had to be another word in every language). So thanks for reminding me that this was the right way to do it, it made me realise the problem was somewhere else! – Manuel van den Notelaer May 04 '17 at 09:03

1 Answers1

1

Use <%=

<a href="<%= ConfigurationSettings.AppSettings["manual"] %>">link</a>

Read this for more info: https://stackoverflow.com/a/5833293/5836671

Community
  • 1
  • 1
VDWWD
  • 35,079
  • 22
  • 62
  • 79