Request.ServerVariables namespace

Posted on 2009-02-20
Last Modified: 2012-05-06
I'm trying to use Request.ServerVariables in a project and it errors.

Name 'request' is not declared.

I have Imports System.Web.

What is the namespace? What do i need to get this to work?

Question by:BobCSD
    LVL 11

    Expert Comment

    It is in the System.Web.UI namespace as part of the Page class.
    LVL 11

    Accepted Solution

    If you are accessing this outside the scope of a page, use below:

    Imports System.Web

    LVL 16

    Assisted Solution

    If you are using it in a class then you can try System.Web.HttpContext.Current.Request

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Suggested Solutions

    AJAX ModalPopupExtender has a required property "TargetControlID" which may seem to be very confusing to new users. It means the server control that will be extended by the ModalPopup, for instance, if when you click a button, a ModalPopup displays,…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now