Copied to clipboard

Flag this post as spam?

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


  • Stefan Kip 1614 posts 4131 karma points c-trib
    Sep 10, 2009 @ 21:57
    Stefan Kip
    0

    Using my own aspx pages in Umbraco

    Hi people!


    I'm a newbie when it comes to Umbraco, but I love it already!
    Currently working on the new Dutch Aston Martin website for Kroymans The Netherlands, in Umbraco ;-)
    The website can be found here: http://am.infocaster.net

    But that's not why I've created this topic :)
    I'm a little bit stuck. What I'm trying to achieve, is to use a custom aspx page, so without a node for it inside the Content pane and no Document Type / template.
    I don't know if that's the way to go, so I wanted to ask that question here:

    What's the way to go when it comes to using custom aspx pages? I just want to have a page with my own logic, connection to my own database and show some pre-owned cars :)

    Thanks in advance!

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Sep 10, 2009 @ 22:14
    Stefan Kip
    0

    I forgot to mention some more details: (where is the edit function? :P)

    I want to create a page called "PreOwned", like http://mydomain.com/preowned (I'm already using UrlRewriting).
    But I also need url's for the preowned details page, like http://mydomain.com/preowned/12345/Aston-Martin-DB9
    This page is the same page for every car with information from my database, so they cannot be added to the Content section.

    I hope I described my problem clearly enough :)

  • Tommy Poulsen 514 posts 708 karma points
    Sep 10, 2009 @ 22:15
    Tommy Poulsen
    3

    It's possible to just use your existing aspx pages by adding the pages and/or paths to the umbracoReservedUrls and umbracoReservedPaths settings of the web.config - this way you completely avoid using any Umbraco logic on these pages, but you can obviously still refer common stylesheets etc.

    Alternatively, if you prefer to facilitate from using shared layout etc. you could consider adding your logic to .Net user controls, and reference it from Umbraco templates or content nodes.

    Just my 5 cents....

    >Tommy

  • skiltz 501 posts 701 karma points
    Sep 10, 2009 @ 22:17
    skiltz
    0

    Hi.

    You can create asp.net usercontrols ".ascx" files and then place them into umbraco.

    Check out this article http://en.wikibooks.org/wiki/Umbraco/Samples_and_Articles/Dot_Net_Controls/Using_Dot_NET_Controls_With_Umbraco

    The steps are basically

    -Create a new asp.net website in Visual Studio.

    -Compile project and place you dll in Umbraco bin folder.

    -Copy usercontrols to Umbraco usercontrol directory.

    -In the developer section of Umbraco add a new macro and select user control.

    - Place macro in Template or Content Page.

     

    Hope this helps.

    Thanks,
    Matthew

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Sep 10, 2009 @ 22:54
    Stefan Kip
    0

    Thanks for the reply Matthew.
    I'm already familiar with the .net usercontrol macro's, but in orde to use them, I still need to create a content page, because if I don't, Umbraco won't recognize the url.

    I also tried placing just an aspx file in the umbraco root dir, but that doesn't work (404) or did I miss something? I should be able to call some aspx file, shouldn't I?

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Sep 10, 2009 @ 22:56
    Stefan Kip
    0

    Oh, I didn't see our reply Tommy.

    You just told me exactly what I was asking in my previous reply, by using the umbracoReservedUrls, thanks for that.
    But you're also saying that this will completely avoid Umbraco. So I won't be able to use any of the Umbraco masterpages?

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Sep 11, 2009 @ 00:12
    Morten Bock
    0

    You can still use the masterpages that you have in umbraco. Just reference the master page you want in the top of your .aspx file.

    Just notice that you cannot use the <umbraco:item> tags in your master template then, since your .aspx page does not have any umbraco context page to get content from.

    You may want to consider using a masterpage instead of an external .aspx page. A masterpage can still have a .cs codebehind file, so you would be able to do som elogic there.

    The way you could the use your masterpage without creating any umbraco content, is using it as an alternate template like this: example.com/some-content-page/masterpagealias.aspx

    This would use the masterpage to render the page "some-content-page".

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Sep 11, 2009 @ 10:01
    Stefan Kip
    0

    Thanks Morten and Tommy,
    It's a pity I can't define both of your posts as Answer, but Morten's answer has given me the idea how to solve this.

    Now I created 2 DocumentTypes; Pre-owned and Pre-owned-detail.
    Pre-owned will be accessible like any other content page via the url http://mydomain.com/pre-owned

    I will handle the calls for the details page myself by using the UrlRewrite module in IIS7.
    So when I get a url like http://mydomain.com/pre-owned/12345/Aston-Marting-DB9 I will rewrite it to http://mydomain.com/pre-owned/detail?id=12345

    Thanks again :)

  • Benjamin Clapp 5 posts 25 karma points
    Apr 08, 2010 @ 20:42
    Benjamin Clapp
    0

    I know this is an older post, but I am wanting more detail on your response Morten.

    "You may want to consider using a masterpage instead of an external .aspx page. A masterpage can still have a .cs codebehind file, so you would be able to do som elogic there."

    I am very new to .net programming and I am trying despratly to move my companies website system out of framesets (yes I know...that should have been done about 10 years ago) and into Umbraco. I am the graphic designer that has slowly had to fill the shoes of the programmer, and I have been comissioned to get us more SEO. The question is this, we have built the pages and applications and logic already, i want to move what we have into umbraco and use the template system there. If i go through and convert my aspx pages into masterpages and have them set up through the template, where do I put my .cs codebehind files?

  • Comment author was deleted

    Apr 13, 2010 @ 14:11

    Im a noob at umbraco myself but i myself would use umbraco since you have / plan to install it. I would go for setting up a masterpage within umbraco adomin and then create a usercontrol for the preowned part. Since Umbraco uses standard membership, roles etc yu should pretty much be able to build an independent web project linked to the site db and then just compile and push the control / s into umbraco? The querystring issue should be solveable?

  • Ciaran McCusker 54 posts 93 karma points
    Dec 07, 2011 @ 16:12
    Ciaran McCusker
    0

    Hi,

    I am new to Umbraco, but I am having the same issue and I cannot browse to any .aspx file.

    I can however browse to .asp or .html files even if they have not been added to the umbracoReservedUrls in the web config.

    I have even tried to browse for the file but no luck, it also removes the  ".aspx" for files in the umbracoReservedUrls

    This is my details:

    <add key="umbracoReservedUrls" value="~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx" />
    <add key="umbracoReservedPaths" value="~/umbraco,~/esl,~/help,~/pdf,~/ftcheck,~/fluencytutordemo,~/videotours,~/webfiles,~/ctg,~/techlearning,~/district" />

    Even if I try to browse to the standard umbracoReservedUrls I get an error message?

    ERROR MESSAGE - 

    Page not found

    No umbraco document matches the url 'http://www.texthelp.com/config/splashes/noNodes'

    umbraco tried this to match it using this xpath query'/root/* [@urlName = "config"]/* [@urlName = "splashes"]/* [@urlName = "nonodes"]')

    This page can be replaced with a custom 404 page by adding the id of the umbraco document to show as 404 page in the /config/umbracoSettings.config file. Just add the id to the '/settings/content/errors/error404' element.

    For more information, visit information about custom 404 on the umbraco website.

     

    Any ideas on how I can fix??????

Please Sign in or register to post replies

Write your reply to:

Draft