-2

Checking there are any option to read the config values directly from aspx page (I know how to read using codebehind).

AProgrammer
  • 158
  • 3
  • 13

3 Answers3

0

You can do the same thing in your aspx page using some server tags e.g.

<% Dim s as string = System.Configuration.ConfigurationManager.AppSettings("mysetting") %>
AGB
  • 2,378
  • 21
  • 37
0

You can use the ConfigurationManager and theOBJECT tag.

Web.Config

</configuration>
    <appSettings>
        <add key="Setting" value="Value"/>
    <appSettings>
</configuration>

ASPX

<object>
    <param name="Setting" value="<%= System.Configuration.ConfigurationManager.AppSettings["Setting"] %>" />
</object>
0

Got the solution

<%$  appsettings:*KeyName* %>

here keyname is the actual name in web.config also note you need a $ Symbol

AProgrammer
  • 158
  • 3
  • 13