Copied to clipboard

Flag this post as spam?

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


  • Andraž 45 posts 65 karma points
    Feb 27, 2010 @ 17:30
    Andraž
    0

    Using page directive

    Hello,

    i'am asking how could i use "Page" directive instead "Master" ...

    is there is any way to use this:

    <%@ Page Language="C#" Inherits="OboutInc.oboutAJAXPage" %>

    I didn't find how to change, beacuse this doesn't work:


    <%@ Master Language="C#" MasterPageFile="/umbraco/masterpages/default.master" AutoEventWireup="true"  Inherits="OboutInc.oboutAJAXPage%>

    it says: directive 'page' is unknown

    Thanks,

    Andra

     

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Feb 27, 2010 @ 18:06
    Morten Bock
    2

    The page hit is always default.aspx, so that would be the place to change it, BUT, you need to do a bit of work. The page already has an inherits attribute, so you would need your own oboutAJAXPage to inherit from umbracos page, and make sure to call the base methods.

    Just beware that you might break stuff since this is a bit of a hack!

  • Andraž 45 posts 65 karma points
    Feb 27, 2010 @ 19:35
    Andraž
    0

    Hey,

    really thank you for your help and reply...i'am a newbie in umbraco and also in programming....so i would need a little bit more information from you. Where do i change that, that is where do i find the aspx file from site (default.aspx). And then i create another page oboutAJAXPage from where i call the base methods?

     

    By

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Feb 27, 2010 @ 23:11
    Aaron Powell
    1

    Without rewriting how Umbraco handles requests you can't change the "page" which all Umbraco pages run via (default.aspx). What's wrong with having the functionality in the MasterPage?

    If you really need a "page", does it have to be CMS manageable? you could always create your own ASPX page which resides outside Umbraco.

    Maybe if you better explain what you're wanting to achieve then we can help you get a better solution.

  • Andraž 45 posts 65 karma points
    Feb 28, 2010 @ 08:11
    Andraž
    0

    Hey,

    i want to have an Ajax page - Tab Strip (Tabs) - CallbackPanel inside tabs from obout, and i must use this:

    If you are using pages without code behind, add the next line on top of your aspx page:
    <%@ Page Language="C#" Inherits="OboutInc.oboutAJAXPage" %>

    If you are using pages with code behind, derive your page like this:

            public class PageName : OboutInc.oboutAJAXPage

    where PageName is the name of your page.

     

    And i did derive my page with code behind and had: <%@ Master Language="C#" Inherits="OboutInc.oboutAJAXPage" %> or <%@ Master Language="C#" %>

     

    And it always says: directive "page" is unknown

  • Andraž 45 posts 65 karma points
    Mar 01, 2010 @ 09:50
    Andraž
    0

    Any solutions :) ?

  • Andraž 45 posts 65 karma points
    Mar 02, 2010 @ 11:25
    Andraž
    0

    I forgot to add..that it need the cms Umbraco solution beacuse I use some Macros in my page, so it would be difficul to use a page that would resid outside Umbraco.

     

    By

  • Andraž 45 posts 65 karma points
    Mar 05, 2010 @ 08:40
    Andraž
    0

    So, there is no way I can change the "Master" directive to "Page" directive withotu using the ASPX page which resides outside Umbraco.

    By,

    A.

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Mar 05, 2010 @ 11:53
    Aaron Powell
    0

    Master Page and Page are very different in ASP.NET, regardless of Umbraco or not. And they aren't interchangeable.

    Umbraco doesn't have physical representation of each page that's created, so you can't change what an individual page uses. If you desperately need to use that custom Page then you'll have to create a page which isn't managed within Umbraco (using the umbracoExcludePaths or umbracoExcludeUrls appConfig settings), or working out how to use those AJAX features in a User Control.

  • Andraž 45 posts 65 karma points
    Mar 05, 2010 @ 13:27
    Andraž
    0

    Tnx for reply, can I ask this:

    i used custom Page(umbracohelp.aspx - just as an example) and add this:  <add key="umbracoReservedURLS" value="/masterpages/umbracohelp.aspx"/> ... instead of umbracoExcludeUrls is this OK?

    Can I then add in "umbracohelp.aspx", this: MasterPageFile="UserMaster.master" and the content holder? I want to use "umbracohelp.aspx" inside "UserMaster.master" content place holder.

    Sorry, i'am a newbie...so some of this question could be really pain in the ass.

    Best regards,

    A.

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Mar 07, 2010 @ 02:43
    Aaron Powell
    0

    Yeah sorry it was umbracoReservedUrls, I didn't have any Umbraco open so I was trying to guess.

    And when it's an reserved URL it is acts like any standard ASP.NET page. It can inherit from any Master Page, you can use any control, etc.

Please Sign in or register to post replies

Write your reply to:

Draft