Copied to clipboard

Flag this post as spam?

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


  • Muhammad Tahir 12 posts 33 karma points
    Apr 23, 2012 @ 02:33
    Muhammad Tahir
    0

    Code Behind for Umbraco Templates?

    I am using VS2010 with umbraco 4.7.1

    When I create a codebehind file for a template e.g. MasterPage and inherit the umbraco.masterpages.MasterPage file in MasterPage.master, it crahes everytime.

    If I inherit umbraco.presentation.masterpages._default (as suggested by a few other bloggers) t does not crash but then the code behind doesn't work.

    Is there any "How To" available? New to umbraco so any help is appreciated.

  • Jeroen Breuer 4861 posts 12138 karma points MVP 3x admin c-trib
    Apr 23, 2012 @ 12:32
    Jeroen Breuer
    0

    Maybe this blog can help you. Go to the #Protip: Creating new templates part: http://tech.kipusoep.nl/2010/07/23/umbraco-45-visual-studio-2010-dotless-jquery-vsdoc-squishit-masterpages/

    Jeroen

  • Muhammad Tahir 12 posts 33 karma points
    Apr 24, 2012 @ 03:11
    Muhammad Tahir
    0

    Thanks Jeroen

    I have followed the steps in that blog but still the template MasterPage.master cannot inherit the umbraco.masterpages.MasterPage 

    If I update the umbraco.dll with a newly compiled umbraco.dll I get the url rewrite error

  • Eric Herlitz 97 posts 129 karma points
    May 05, 2012 @ 17:48
    Eric Herlitz
    0

    I released this tool a while ago https://umbracocs.codeplex.com/

    It will create the code-behind in a correct way and also implement the codebehind in the masterpage, you can simply modify the created .cs file to inherit from your preferred source.

    Cheers

  • Muhammad Tahir 12 posts 33 karma points
    May 11, 2012 @ 03:33
    Muhammad Tahir
    0

    Thanks Eric. This works like a charm.

  • 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