Copied to clipboard

Flag this post as spam?

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


  • Yovav Gad 41 posts 62 karma points
    Jul 20, 2010 @ 00:10
    Yovav Gad
    0

    Code behind in Master Pages and User Controls

    Dear Umbraco,

    I started using Umbraco and I wonder what would be a good way to develop user controls and master pages,

    I like to have the whole web application open in Visual Studio and be able to use intellisense and stuff...

    is there any reason why not to use code behind in the master pages or user controls ?

    CodeFile="MyMaster.master.vb" Inherits="MyMaster"

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Jul 20, 2010 @ 00:47
    Tim
    1

    There's nothing stopping you making usercontrols with code behind, the built in ones have code behind they're just compiled, so you can't see it..

    For master pages, I think you should be able to use code behind as well if you want to (although I've not tried it myself).

    Hope that helps!

    :)

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jul 20, 2010 @ 00:53
    Aaron Powell
    0

    Umbraco can run compile or uncompiled (ewwww) backing files with no problems. I've done sites that have masterpages which inherit from a class and I always have a backing class for my .NET user controls

  • Yovav Gad 41 posts 62 karma points
    Jul 20, 2010 @ 00:56
    Yovav Gad
    0

    Thanks for your answers,

    Is there Umbraco classes for Page, MasterPage or User Controls that I should inherit from ?

    Or just System.Web.UI.Page ?

Please Sign in or register to post replies

Write your reply to:

Draft