Copied to clipboard

Flag this post as spam?

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


  • jtrip 13 posts 103 karma points
    Jul 27, 2016 @ 14:35
    jtrip
    0

    check URL (Request) from RenderMvcController controller

    Is it possible to check the current page url from an ActionResult in a class inheriting from RenderMvcController?

  • jtrip 13 posts 103 karma points
    Jul 27, 2016 @ 15:34
    jtrip
    100

    Well I seem to have figured it out.

    this.HttpContext.Request
    

    This is working for me (.RawUrl or .Url etc.)

    I suspect in many other cases the controller may have functions that are running independent of a request and so that might not be available in some circumstances.

  • 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