Page1.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Page1.aspx.cs" Inherits="Application.跨页面传送.Page1" %>
Page2.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Page2.aspx.cs" Inherits="Application.跨页面传送.Page2" %>
Page2.aspx.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Application.跨页面传送
{
public partial class Page2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
#region 第一部分
if (PreviousPage != null)
{
TextBox myTextBox = PreviousPage.FindControl("aaaa") as TextBox;
if (myTextBox != null)
{
this.Label1.Text = myTextBox.Text;
}
}
#endregion
}
}
}
Page0.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Page0.aspx.cs" Inherits="Application.跨页面传送.Page0" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Page0.aspx.cs" Inherits="Application.跨页面传送.Page0" %>