Re: request, session and application 'not defined'?
- From: "Scott M." <smar@xxxxxxxxxxxxx>
- Date: Sun, 13 Jan 2008 17:27:53 -0500
You do have a reference to System.Web, right?
"James R. Davis" <Jim@xxxxxxxxxxx> wrote in message
news:%23p6hoohVIHA.6044@xxxxxxxxxxxxxxxxxxxxxxx
I did not have System.Web imported but when I added it there was no change
whatever in the VS diagnostic.
Further, when I tried changing the Request to HTTPRequest the diagnostic
changed to:
"Reference to a non-shared member requires an object reference"
All I am trying to do is convert some ASP code to ASP.NET as a learning
strategy. Your help is greatly appreciated.
"Scott M." <smar@xxxxxxxxxxxxx> wrote in message
news:udL0pVhVIHA.5360@xxxxxxxxxxxxxxxxxxxxxxx
The actual classes are: HTTPRequest, HTTPServer and HTTPSession. But,your
you
can use Request, Server and Session if you have System.Web imported in
code. Do you?went
"James R. Davis" <Jim@xxxxxxxxxxx> wrote in message
news:u0qfFThVIHA.5208@xxxxxxxxxxxxxxxxxxxxxxx
I am building a set of shared functions and subroutines in a vb file
located
in my App_Code section of my application. The first three functions
fine and work as expected. But I am now starting a subroutine that
must
work with certain server variables and I have been stopped cold.
This is the code that frustrates me:
Sub GetConfig()
Dim strPathURL as string
strPathURL = Left (Request.ServerVariables("Path_Info"),
InStrRev(Request.ServerVariables("Path_Info"), "/"))
...
end Sub
Visual Studio states that [Name 'Request' is not declared.]
Indeed, it does the same for any statement I try that uses 'Request',
'Server', 'Session' or 'Application'.
I started the VB page with:
Imports Microsoft.VisualBasic
Imports System.Data
What more do I need to do? Thanks!!
.
- Follow-Ups:
- Re: request, session and application 'not defined'?
- From: Juan T. Llibre
- Re: request, session and application 'not defined'?
- References:
- request, session and application 'not defined'?
- From: James R. Davis
- Re: request, session and application 'not defined'?
- From: Scott M.
- Re: request, session and application 'not defined'?
- From: James R. Davis
- request, session and application 'not defined'?
- Prev by Date: Re: Don't Understand Error Message (Database)
- Next by Date: Re: request, session and application 'not defined'?
- Previous by thread: Re: request, session and application 'not defined'?
- Next by thread: Re: request, session and application 'not defined'?
- Index(es):
Relevant Pages
|
Loading