Copied to clipboard

Flag this post as spam?

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


  • Pickels 75 posts 108 karma points
    Aug 03, 2010 @ 10:21
    Pickels
    0

    Python macro: HttpContext

    Hello,

    does anybody know how I can access the HttpContext in a Python macro? I need it so I can use mappath to add references.

    I got an example of a macro here: http://pastebin.com/XqfeU6ED as you can see I hardcoded the file path but I would like to use mappath for this.

    from System.Web import HttpContext doesn't work.

    Kind regards,

  • Pickels 75 posts 108 karma points
    Aug 03, 2010 @ 12:07
    Pickels
    0

    Seems I could just load the dlls with:

        import clr
        clr.AddReference('cms')
        clr.AddReference('businesslogic')

    Thought it didn't work before because it showed errors but it seems it was showing a cached marco.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies