J
James R. Davis
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 went
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!!
in my App_Code section of my application. The first three functions went
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!!