Remembering widget states when navigating across pages

I have multiple pages with unique widgets on each page. I would like the widgets to remember what state they are in when the user navigates back and forth. Is there an easy way to do this without using OnPageLoad?

No. Using variables is the only way to preserve state across pages.

You’ll need variables to represent whatever you want to save and an event (such as OnPageLoad - by any event can work) to modify the page based on the values of the variables.

OK, darn. Can you point me towards documentation on how to do this? (if you know off-hand)

Well, it depends on specifically what you want to do, but let’s say you wanted to remember what state a dynamic panel was on.

On the panels OnStateChange event, you could set a variable to have a value that is the same as the state name.

If state equals A
Set variable panelState to "A"

If state equals B
Set variable panelState to "B"

And so on for all states.

Then on the OnPageLoad event for that page:

Set panel to state: [[panelState]]

Follow up to @nkrisc: You need to add conditions like this:

If value of varPanelState equals “A”
Set panel to state A (can be anything)

If value of varPanelState equals “B”
Set panel to state B


Thanks for the help!