How can I transfer to a confirmation page using:
protected void Transfer_Click(object sender, EventArgs e)
{
if (Page.IsValid)
{
Server.Transfer("~/NewApplicationConfirmation.aspx");
}
}
Then, on the new page (NewApplicationConfirmation.aspx) transfer back to the original page if a user clicks edit:
protected void Edit_Click(object sender, EventArgs e)
{
if (Page.IsValid)
{
Server.Transfer("~/NewApplication.aspx");
}
}
When I click Edit now, it just blanks out all the data in NewApplicationConfirmation.aspx and doesn't change back to NewApplication.aspx
Notes:
--the address at the top does not change from /NewApplication when I do the first server transfer AND the address at the top does change to /NewApplicationConfirmation when I click edit
--I am using ASP.net 4.5 c#
--FriendlyURLs is installed (by default)
--I am using a master page on both pages
EDIT Additional info:
When I do my first transfer I use
var cp = PreviousPage.Master.FindControl("MainContent") as ContentPlaceHolder;
TextBox PrevinputAppName = cp.FindControl("inputAppName") as TextBox;
inputAppName.Text = PrevinputAppName.Text;
to find the controls. How do I transfer these back to the original page? Also note, when I do my second server.transfer, the confirmation page shows up blank -- the newapplication.aspx page doesn't appear in the browser