Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • dominik 711 posts 733 karma points
    Nov 09, 2012 @ 14:35
    dominik
    0

    Show web.config setting in template / masterpage

    hello,

    I try to show the following variable within our head section of the masterpage: 

    ConfigurationManager.AppSettings["Environment"]

    How can i get it into my template?

    I tried it by using <%= ConfigurationManager.AppSettings["Environment"] %>

  • Jan Skovgaard 11258 posts 23500 karma points MVP 7x admin c-trib
    Nov 09, 2012 @ 19:29
    Jan Skovgaard
    0

    Hi Dominik

    If you don't mind using an XSLT based macro you should be able to fetch the above setting by following the example provided by Chriztian Steinmeier in this post: http://our.umbraco.org/forum/developers/xslt/13729-Best-way-of-getting-value-from-webconfig-in-XSLT?p=0#comment130586

    /Jan

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies