Copied to clipboard

Flag this post as spam?

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


  • Alen Jose 8 posts 28 karma points
    Dec 12, 2014 @ 06:04
    Alen Jose
    0

    Code behind in umbraco Templates

    Hi All,

    In my application i have some umbraco pages and static aspx pages. I need to write C# code in umbraco templates like aspx page code behind(example: page load). Can anyone help me to solve this problem?

    thanks

    Alen

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Dec 12, 2014 @ 06:07
    Jan Skovgaard
    0

    Hi Alen

    May I ask why you need to write codebehind in your Umbraco templates? What is your scenario?

    It's not recommended to do so in the Umbraco templates I think. So asking to see if you could perhaps achieve what you need in another way.

    Cheers, Jan

  • Alen Jose 8 posts 28 karma points
    Dec 12, 2014 @ 09:50
    Alen Jose
    0

    Hi Jan,

    Thanks for your speedy reply.

    My scenario is,

    I am working on a website .The website is basically in asp.net developed in Visual Studio 2012. The website has many static pages and ecommerce pages developed in aspx. Currently we have a new requirement to separate out the ecommerce section from the static section and move the static content into Umbraco CMS retaining the current structure. So we need to call some methods from our C# class to this changed umbraco pages.

     

    thanks,

    Alen

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Dec 12, 2014 @ 20:39
    Jan Skovgaard
    0

    Hi Alen

    What kind of logic are you having in the code behinds currently?

    Perhaps you can add macroes based on either usercontrols or mvc, which will make the pages able to work in the same manner but without the codebehind in the .aspx files.

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft