Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: "'Request' is not declared" error...


Message #1 by planeswalk@h... on Tue, 9 Jul 2002 12:12:54
Hi, all!

Just one error really bugs me. Please see below:

------------------------------------------------------------------
Compiler Error Message: BC30451: Name 'Request' is not declared.

Source File: d:\64.49.226.132\label.vb    Line: 13
------------------------------------------------------------------

Here is my whole code (as you can see it doesn't do much...) I am trying 
to test Request.Params but apparently it has other plans. Any suggestions? 
As you might have guessed, I'm rather new to .NET and learning it by trial 
and error. Many thanks!

Public Class RequestTest

  Sub Page_Load(sender As Object, e As EventArgs)

    Dim pageIndex As String = Request.Params("_pageIndex")

    If(pageIndex <> "") Then
        Response.Redirect("/page1.aspx")
    Else
        Response.Redirect("/page2.aspx")
    End If    

  End Sub

End Class

-----------------------------------------------------------------------


Best Regards,

Marlon

  Return to Index