I have a ASP.Net 2.0 web app in VB. I need to copy all relavant data for the current customer shown on the page from a menu action item. Then when the action has completed the copy methods, with a new Unique reference ID, I need to reload the same page with the relavant data of the new unique ID.
For instance,I have a contract for renewal. I open the contract and all the relavant data is diplayed. I select renew contract from a menu item and it calls the mehods to copy all the original data and creates a new unique contract ID. Once the copy is complete, the same page is reloaded with the new uniqueID and newly created data.
I have created all the copy procedures and fire them with the menu item. I am used to using Reponse.Redirect to open another form, but how do you re-open the same form with new information?
What I have come up with so far:
The Page is loaded referencing the session variables, one of which is the contractID.
So I added code after the copy procedure to get the session variable, change it to the new contractID and re-load the page with the new contractID.
WebUserSession.SessionInfoGet()
Session.ContractID = NewContractID
WebUserSession.SessionInfoSet(Session)
Response.Redirect("..\frmContract.aspx")
It works, but I am concerned that this might not be the best way, because now if I want to navigate back to the original contract I will have to change the Session.ContractID back to the original.