I am trying to put this in my markup:
<script type="text/javascript" src="<%$ AppSettings:proxyScriptUrl %>"></script>
But for some reason this is not accepted. What am I doing wrong here?
The requirement is that I do not use a helper method but that the expressionbuilder is used in the markup.
According to the documentation, that's not allowed:
This might help you if want to do it all in the aspx file:
Note the unpleasant single quotes in the text variable - trying to us escaped double quotes results in "Badly formed script tag" errors.
Edit: apologies - I've swapped the order around this does work.
When I do this I usually create a helper class I like to call Config and put a static property on there for the App Settings in question.
Then your code would become:
Some of the other benefits of this is that if I decide to move the ProxyScriptUrl to a different configuration mechanism I only have to modify the one class. Your config class might look like: