Access page parameters from vbscript
I am having trouble accessing a parameter passed from one apsx page to another from vbscript in the receiving page.
I've simplified my target code right down to focus on the issue of accessing the passed parameter.
I'm not certain if this is an ASPX issue or a vbscript, I confess, I'm a little lost.
Here's the full page, any help appreciated.
------------- Code Begins ----------------
<%@ Page language="c#" Codebehind="TestRequest.aspx.cs" AutoEventWireup="false" Inherits="TestWordWeb.TestRequest" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>TestRequest</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body>
<form id="TestRequest" method="post">
You clicked link number <%=Request.QueryString["link"]%>!<BR><BR>
<A HREF="TestParams.aspx">Try again</A>
<SCRIPT LANGUAGE="VBScript">
dim id
id = 1
</SCRIPT>
<SCRIPT LANGUAGE="VBScript">
dim id2
'
id2 = <%=Request.QueryString["link"]%>
' <!-- Using Normal brackets causes the following message
'
' <!-- Now how do I use id2 from here ?
<%=Response.Write(id2)%>
' <!-- causes the following error
' <!-- Compiler Error Message: CS0103: The name 'id2' does not exist in the class or namespace 'ASP.TestRequest_aspx'
</SCRIPT>
</form>
</body>
</HTML>
J
|