Copied to clipboard

Flag this post as spam?

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


  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    Nov 14, 2016 @ 20:09
    Michaël Vanbrabandt
    0

    Shared functions between views

    Hi all,

    I have some razor functions that needs to be shared between views. On stackoverflow I saw that you need to create a razor view in the App_Code folder. But then you need to inject everything into your method.

    If I place this in a new folder called Functions in my Views folder, then I can inherit everything I need but then I can't call these functions from within my other views.

    Anyone that can help me out?

    /Michaël

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Nov 15, 2016 @ 09:32
    Dave Woestenborghs
    0

    Do you have a example on what you are trying to do ?

    Dave

  • 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