request, session and application 'not defined'?



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!!


.



Relevant Pages

  • Re: How to run VBA code on all rows of a table
    ... Private Sub SubName() ... put in ALL the code from all seven subroutines ... THEN how do I call the function in a query ...
    (microsoft.public.access.formscoding)
  • A very general question to perl experts
    ... I am facing a problem day-in and day-out with my perl code. ... a couple of subroutines in it. ... sub setup { ... readDefectData is one of them. ...
    (perl.beginners)
  • Re: Request for advice/suggestions....
    ... p01 => 'PAPER ITEMS GENERAL', ... 10 categories there would be ten subroutines - one for each category - ... sub records { ... As for generalizing your category subroutines, again a lot depends on the scope ...
    (perl.beginners)
  • Re: system32 skill.exe And EXCEL by VBS file...
    ... I got a job about writing some txt files into a Excel sheet. ... Any other run write the second col (value1) ... sub GetParms ... You tend to mix the main routine and the subroutines freely, ...
    (microsoft.public.scripting.vbscript)
  • Re: Syntax Problem...
    ... Also, if you want to use subroutines, get in the habit of passing things ... #is Set_file a good name for this sub?? ... Although it doesn't affect the result, since mtime and mtime_2 are ... > message and then runs through a new loop. ...
    (comp.lang.perl.misc)