Copied to clipboard

Flag this post as spam?

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


  • Ben 91 posts 111 karma points
    Mar 14, 2012 @ 08:37
    Ben
    0

    Access appSettings variables via razor macro

    I'm not sure if it's possible. I want to get the value of some appSettings variables via a razor macro.

    I know I can do it via a user control macro, but I don't want do add a new component to my site, I just want to do it with some inline code/macro.

    Do you have any suggestion for me? 

    Thanks from advance!

  • Dirk De Grave 4537 posts 6006 karma points MVP 3x admin c-trib
    Mar 14, 2012 @ 08:55
    Dirk De Grave
    0

    Ben,

    If you can do it from a user control, you should be able to do it from razor as well, it's just plain c#, so the same methods should be available inline or in your razor code.

     

    Cheers,

    /Dirk

  • 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