• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1609
  • Last Modified:

Request.ServerVariables namespace

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?

thanks.
0
Starr Duskk
Asked:
Starr Duskk
  • 2
2 Solutions
 
jmwheelerCommented:
It is in the System.Web.UI namespace as part of the Page class.
0
 
jmwheelerCommented:
If you are accessing this outside the scope of a page, use below:

Imports System.Web

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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now