Q:

referencing appSettings from usercontrols

In my .ascx usercontrol i'm trying to dynamically generate links using a value i've stored in  web.config.
<a href="<%$appSettings.MYPATH%>/file.aspx">link</a>

and when i try running, i get a parser error
Literal expressions like '<%$appSettings.MYPATH %>' are not allowed. Use <asp:Literal runat="server" Text="<%$appSettings.MYPATH%>" /> instead.

I know i'm probably missing something relatively minor. 

A:

<%= ConfigurationManager.AppSettings["myKey"] %>

EDIT:Don't forget the =

A:

    <a href="<%= System.Configuration.ConfigurationManager.appSettings("MYPATH") %>">link</a>

should work (it at least does on the IIS server I use). (Unfortunately it's more verbose)

