Copied to clipboard

Flag this post as spam?

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


  • Louis 37 posts 59 karma points
    Jan 04, 2012 @ 15:51
    Louis
    0

    Adding Code Behind to the Master pages

    Hi all,

     

    I have my master pages created nicely in the templates section of umbraco, is it possible to add code behind to these master pages? If so, what is the best way to add it?

     

    thanks

     

    Louis

  • Michael Latouche 504 posts 819 karma points MVP 4x c-trib
    Jan 04, 2012 @ 16:21
    Michael Latouche
    0

    Hi Louis,

    The best way is to do this in Visual Studio. You can then include the master page created in Umbraco in your solution, and normally adding a class file with the same name as your master page + ".cs" extension should do the trick.

    There are some posts explaining how to setup a Visual Studio solution for Umbraco, and there is even a package that creates a basic "Umbraco Visual Studio Solution". You can check it, it might be a good start for what you are trying to do : http://our.umbraco.org/projects/developer-tools/visual-studio-2010-project-template

    Cheers,

    Michael.

Please Sign in or register to post replies

Write your reply to:

Draft