using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Asp_Project
{
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", false);
}
protected void btnredirec_Click(object sender, EventArgs e)
{
Response.Redirect("~/WebForm2.aspx");
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections.Specialized;
namespace Asp_Project
{
public partial class WebForm2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//NameValueCollection previousformCollection = Request.Form;
//lblName.Text = previousformCollection["txtName"];
//lblEmail.Text = previousformCollection["txtEmail"];
Page perviouspage = Page.PreviousPage;
if (perviouspage != null)
{
lblName.Text = ((TextBox)perviouspage.FindControl("txtName")).Text;
lblEmail.Text = ((TextBox)perviouspage.FindControl("txtName")).Text;
}
}
}
}
No comments:
Post a Comment