Copied to clipboard

Flag this post as spam?

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


  • Jamaal 6 posts 116 karma points
    Sep 11, 2023 @ 12:42
    Jamaal
    0

    Request.Browser and Request.UserAgent

    Hi,

    Im getting this error locally

    The name 'Request' does not exist in the current context

    My code

    @if(Request.Browser.IsMobileDevice && !Request.UserAgent.Contains("iPad") && !Request.UserAgent.Contains("Tablet"))

    How can I make this run locally?

    Thanks

  • Huw Reddick 1932 posts 6722 karma points MVP 3x c-trib
    Sep 12, 2023 @ 05:18
    Huw Reddick
    100

    If this is in an umbraco page view, try Context.Request

  • 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