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 1929 posts 6697 karma points MVP 2x c-trib
    Sep 12, 2023 @ 05:18
    Huw Reddick
    100

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

Please Sign in or register to post replies

Write your reply to:

Draft