Reputation: 1564
i want to grab an AppSetting key from my webconfig in a regular .htm file - is this possible to do?
Normally id make it into an aspx file so i can do some codebehind something similar but the htm is out in the wild and i dont think i can change the url
Webconfig
<add key="SomeLocation" value="http://my.ip.address/"/>
Htm Markup
<a href="<%=MyCodeBehind()%>">Contact Us</a>
VB.Net Codebehind
Public ReadOnly Property MyCodeBehind() As String
Get
Return General.GetAppSetting("SomeLocation")
End Get
End Property
Thanks
Upvotes: 3
Views: 3000
Reputation: 150138
A file that is not generated with any server-side processing cannot possibly include any additional data, per se.
You do have a few options (if I understand your problem correctly):
Upvotes: 2