Copied to clipboard

Flag this post as spam?

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


  • Tizer 170 posts 201 karma points
    Jul 22, 2010 @ 00:47
    Tizer
    0

    Using app_code and creating a macro (not user control)

    Hi - another newbie question here :(

    I have the following files for exporting a custom table from my database:

    app_code/exporthandler.cs
    Default.aspx
    Default.aspx.cs

    How do I create a macro for use in a template (like the user control video)?

    Is it possible?

    If not - can I run this is a subdirectory in the umbraco directory?

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

    Do you mean you want to put a custom page in as well (your Default.aspx you refer to) or you just want to create a macro?

    You can use App_Code to create any .NET type in Umbraco, but I'd recommend against it as using App_Code means you're storing your uncompiled source code on a production server and ASP.NET has to compile it every time the App_Pool starts up.

  • Tizer 170 posts 201 karma points
    Jul 22, 2010 @ 01:13
    Tizer
    0

    The files export a custom table (not an umbraco table) to csv from the umbraco database - so I wanted to use the code like a user control and create a macro to use on a template. I just want to see if it is possible to integrate it into umbraco and couldn't find any info - (or if not, run it in its own directory)

    I had it made for me a while back - I don't have the original files so can't convert to a usercontrol :(

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

    You can put custom ASP.NET pages into Umbraco, you just have to specify them in the web.config as a reserved URL (so that umbraco doesn't route it). Then you can treat it like a standard ASP.NET page

  • Tizer 170 posts 201 karma points
    Jul 22, 2010 @ 02:20
    Tizer
    0

    Perfect Slace... umbraco really does have everything - Thanks :)

Please Sign in or register to post replies

Write your reply to:

Draft