在 asp 和 aspx 之间传输数据的 2 种可能方式是
使用会话,通过 SQL DB(参考http://msdn.microsoft.com/en-us/library/aa479313.aspx
在中间 ASP 页面中使用 QueryString,如下所示。
您的第一个 ASP 页面:sample.asp
<% language="VBScript"%>
<html>
<head>
<title>Untitled Page</title>
</head>
<body>
<form id="form1" action="process.asp" method="post">
<div>
<input name="Text1" id="Text1" type="text" />
<input id="Submit2" type="submit" value="submit" /></div>
</form>
</body>
</html>
您的中间页面:process.asp
<%@ language="vbscript"%>
<html>
<head>
<title>Untitled Page</title>
</head>
<body>
<form id="form2">
<%response.Write(Request.Form("Text1"))
%>
<%response.Redirect("default3.aspx?icontent=" & Request.Form("Text1")) %>
</form>
</body>
</html>
您的 ASPX 代码页:Default.aspx
public partial class Default3 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Write(Request.QueryString["icontent"].ToString());
}
}