U Can make it by around 6 ways, but the best and recommended way is by using PROPERTIES.
Write properties to access the values in the controls inside the source
Page class:
public string Name
{
get{return txtName.Text;}
}
public string Email
{
get{return txtEmail.Text;}
}
public string Phone
{
get{return txtPhone.Text;}
}
On the button click event, write code:
private void btnSubmit_Click(object sender, System.EventArgs e)
{
Server.Transfer("destination.aspx");
}
On the Page_Load of the destination Page, write the
following code to access the public properties:
SourcePage pgSource;
pgSource= (SourcePage) Context.Handler;
Response.Write(pgSource.Name + "<br>");
Response.Write(pgSource.Email + "<br>");
Response.Write(pgSource.Phone + "<br>");
;)
Tell me how to send the data from one aspx form to another aspx form either by using XML or by any other way.