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 21, 2010 @ 20:04
    Yovav Gad
    0

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

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

    Or just System.Web.UI.Page ?

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

    No, there are no custom classes. You should just use the standard ASP.NET ones

  • Yovav Gad 41 posts 62 karma points
    Jul 22, 2010 @ 00:55
    Yovav Gad
    0

    Thanks.

  • Andrew Lansdowne 43 posts 124 karma points
    Jul 22, 2010 @ 11:49
    Andrew Lansdowne
    0

    Aren't master pages meant to inherit from umbraco.presentation.masterpages._default?

    It looks like that has some code which enables LiveEditing support. Pretty sure if you don't want to try LiveEditing then you don't need to inherit from that though.

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jul 22, 2010 @ 13:33
    Aaron Powell
    0

    Hmm I didn't know that existed, yes if you're after live editing support you could inherit it if you're not inheriting from the umbraco standard masterpage.

    Remember that masterpages can be nested, so your masterpage doesn't need an umbraco type if you're nesting under a masterpage which does.

  • Andrew Lansdowne 43 posts 124 karma points
    Jul 22, 2010 @ 13:48
    Andrew Lansdowne
    0

    I only knew it because when you create a Template via the Umbraco interface it creates a blank .master file which inherits from that. What do you mean by the umbraco standard masterpage? I thought this was it.

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jul 22, 2010 @ 13:52
    Aaron Powell
    0
    <%@ Master Language="C#" MasterPageFile="/umbraco/masterpages/default.master" 

    And I've never notice it set a class define when i create one.

  • Andrew Lansdowne 43 posts 124 karma points
    Jul 22, 2010 @ 13:54
    Andrew Lansdowne
    0

    Oops my bad mine says that too..... it's THAT default.master than inherits from umbraco.presentation.masterpages._default

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jul 22, 2010 @ 13:55
    Aaron Powell
    0

    Correct. Id' always recommend that you have your root-most masterpage have that as its parent unless you plan to reimplement the Umbraco class

  • Yovav Gad 41 posts 62 karma points
    Jul 22, 2010 @ 17:20
    Yovav Gad
    0

    So I also found these:

    umbraco.presentation.masterpages.umbracoPage

    umbraco.presentation.masterpages.umbracoDialog

    umbraco.presentation.masterpages._default

     

    By the way, nested master pages really sucks because it breaks the intellisense in Visual Studio and it's seems wrong...

  • Andrew Lansdowne 43 posts 124 karma points
    Jul 22, 2010 @ 17:34
    Andrew Lansdowne
    0

    IMHO nested master pages are the best way to work with umbraco (prior to MVC at least) - I got my main template wrapper in a single .master file and all the pages on the site are children of that.

    What intellisense are you missing? If its to do with not being able to access public things in the master master then try putting this into your child master page:

    <%@ MasterType VirtualPath="~/masterpages/NTPLMaster.master" %>

    Then you can do Master.Label1 or whatever and it will intellisense it up for you.

  • Yovav Gad 41 posts 62 karma points
    Jul 22, 2010 @ 17:37
    Yovav Gad
    0

    I'm missing all the asp: tags... in master pages that inherit from the default master,

    (when I open it with with visual studio)

  • Andrew Lansdowne 43 posts 124 karma points
    Jul 22, 2010 @ 17:48
    Andrew Lansdowne
    0

    so it does. wonder why that is....

  • Yovav Gad 41 posts 62 karma points
    Jul 22, 2010 @ 17:50
    Yovav Gad
    0

    Because you are not supposed to nest master pages... inheritance is fine though...

  • Andrew Lansdowne 43 posts 124 karma points
    Jul 22, 2010 @ 17:55
    Andrew Lansdowne
    0

    course you are supposed to nest them.... it's a feature

    http://msdn.microsoft.com/en-us/library/x2b3ktt7.aspx

  • Yovav Gad 41 posts 62 karma points
    Jul 22, 2010 @ 18:02
    Yovav Gad
    0

    Yes, you are right, I just found the same page :-)

    But still can't figure out why Visual Studio wont recognize asp: tags

Please Sign in or register to post replies

Write your reply to:

Draft