This topic is locked

An easy confirmation page

11/8/2019 1:20:51 PM
ASPRunner.NET Tips and tricks
Pete K author

A common pattern in processing user submission of data forms is to display a confirmation page showing the data submitted. You can, of course, set the app to show the view record. But now that we can create multiple versions of any page, I like to take advantage of this flexibility to make a more user-friendly confirmation page.
I make a copy of the view page in the designer and rename it to "confirmation". I leave the existing view page as the default because we only want to show the confirmation page one time. A common practice is to remove any fields that don't make sense at this point in the process, such as fields that will be completed by another person later in the workflow. I like to change the title to something like "Confirmation of submission" or whatever. Then I insert a new row below that and place some text in it. Something like "Thank you for your submission..." and so forth. You can tweak anything else you'd like, such as adding custom buttons or anything else that makes sense in this context.
Once the new page is ready, simply go to the "After record added" event of the add page. Here is the code I added, where "requests" is the table name, "ID" is the PK, and "Confirmation" is the name of my custom confirmation page:



// Show confirmation page

string editID = values["ID"];

MVCFunctions.HeaderRedirect("requests","view","editid1=" + editID + "&page=Confirmation");


I love having the ability to create multiple pages. There's virtually no limit to the possibilities.

jadachDevClub member 11/16/2019

I like it Pete. I think I am going to steal your idea <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=89435&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />

Pete K author 11/18/2019



I like it Pete. I think I am going to steal your idea <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=89442&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />


Steal away! You've helped me so many times I feel like I owe you a consulting fee.