For your first page you can opt for:
1. A stored procedure which would return you the last submitted ID's value and you show that in your message.
2. Fetch the last inserted record and select the "id" where timestamp is latest(if you've any column for timestamp in your table).
I'd suggest to use first option because it's time efficient.
For your second page, you can fetch all the records in a object data source and bind your textboxes to it's fields keeping "id" as key field.
Hope this helps you !