
ASP Request Object into ASP.Net
Please help. I am trying to convert an asp page into asp.net easily.
I kept getting an error on one line with the Request object.
Therefore, I created a simple page called webform1.aspx and passed
variable "a" through the querystring. So the url is
http://localhost/webform1.aspx?a=1. The code on the page is the
following:
HTML Code:
Codebehind="WebForm2.aspx.vb" Inherits="TheInsiderWeb.WebForm2"
ASPCompat="true"%>
<script language=VBScript runat=server>
response.write(request.querystring("a"))
</script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>WebForm2</title>
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
<meta name="vs_defaultClientScript" content="VBScript">
<meta name="vs_targetSchema"
content=" http://www.*-*-*.com/ ;>
</head>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
</form>
</body>
</html>
Code Behind:
Public Class WebForm2
Inherits System.Web.UI.Page
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.De{*filter*}StepThrough()> Private Sub
InitializeComponent()
End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form
Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
End Sub
End Class
I get the error:
BC30188: Declaration expected.
Anyone know how to make the response and reuqest objects to work in
the page?
I appreciate any help
Walter