WebForm1
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace ASPproject
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnTransfer_Click(object sender, EventArgs e)
{
Server.Transfer("WebForm2.aspx");
}
public string Name
{
get {
return txtName.Text;
}
}
public string Email
{
get {
return txtEmail.Text;
}
}
}
}
WebForm2
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace ASPproject
{
public partial class WebForm2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//Page lastPage=(Page)Context.Handler;
//lblName.Text = ((TextBox)lastPage.FindControl("txtName")).Text;
//lblEmail.Text = ((TextBox)lastPage.FindControl("txtEmail")).Text;
}
}
}