Previous screen behavior in web app

Previous screen behavior in web app

  

In a web site, how can I accomplish returning to the previous screens while keeping the input parameters for the screen?  For example, I have an order screen with a "contact us" button with URL like "order.aspx?orderid=23".  The button navigates to the "contact us" page, and after the user submits the contact form, I want to navigate back to "order.aspx?orderid=23".

In mobile apps, there is "Previous Screen" destination, but I don't see this in web site destinations.

I tried passing GetBookmarkableURL() as an input parameter, and then navigating to the that URL, but it fails to keep the parameters (passes only "order.aspx").  Thanks.


David Austin wrote:

In a web site, how can I accomplish returning to the previous screens while keeping the input parameters for the screen?  For example, I have an order screen with a "contact us" button with URL like "order.aspx?orderid=23".  The button navigates to the "contact us" page, and after the user submits the contact form, I want to navigate back to "order.aspx?orderid=23".

In mobile apps, there is "Previous Screen" destination, but I don't see this in web site destinations.

I tried passing GetBookmarkableURL() as an input parameter, and then navigating to the that URL, but it fails to keep the parameters (passes only "order.aspx").  Thanks.


if you want to keep the input parameters of previous screen,you can set session variable to hold the input parameters,like this


session variable will hold the value until you close the browser.So when you visit this page again the value will be write in the input box. 


Hi David,

Here is several way to achieve the required functionality:

Solution-1: You are having a page like "order.aspx?orderid=23" and you need to add some contact information for same order then you can open required page("contact us") in popup and after saving the information in this page close the popup then you will remain in same page("order.aspx?orderid=23")


Solution-2: If you dont want to use popup screen then you need to pass OrderId in Contact US page and save button of contact page you can give the destination "order.aspx?orderid=23".


Regards

-SK-

HI David,

As told by Xiao, you can use session variable to hold the value of 23:


regards,

IB

I think viable solutions have been presented.  Is there a way to simply get the page name and parameters, something like a GetUrl function?  GetBookmarkableURL() is available but doesn't include the parameters.  In .NET there are HTTPRequest and HTTPResponse objects with this information - can I access those somehow?

Solution

I located the HTTPRequestHandler extension and added the GetReferrerURL() function to the module.  I save the URL in the referring screen using a session variable to keep the URL somewhat clean:

Session.PreviousUrl = GetReferrerURL()

Then on the contact screen I simply return the user to Session.PreviousUrl.  This goes back to the previous screen and passes all the parameters back too.

Solution

Using GetReferrerURL might be a good one but consider this

ScreenA->ScreenB then I do some button submit (still on ScreenB). Then this will mess up and make infinite loop :)