Remember and Open navTabs

Hello again,

I would like to ask for help on how to:

  1. Remember which navTab is opened from last session?
  2. How to automatically open a navTab (and Tab pane)?

Thank you.


Is it possible to do the following?

  1. Remember which navTab is opened from last session?
  2. How to automatically open a navTab (and Tab pane)?

Thank you.

You can use cookies for remember option …
Can you give us more detail for your second question ?

Hello @s.alpaslan,

I guess I was confused, #1 and #2 seems to be the same. :slight_smile:
For example if user refreshes the browser, he will still be in the navTab that was previously open.

Would you be able to tell me how to save to cookies the open navTab?

Thank you very much for your response.

  • Define your cookies using the Cookie Manager, must be lowercase!

  • Use on click to update the cookie value.

  • Use show/hide/conditional region based on the cookie variable (button state etc).

Remember this could all be cleared by the User upon browser closing, depending on their settings. And depending on the amount of nav tabs it could get quite messy and time consuming to update if you wish to make changes. I’d ask myself if it is necessary or could it be done in an alternative manner, ie maintain a short history of the previous sessions activity in the DB and call it when the User returns to the site (just my two cents)…

This could be done quite simply by having a form on each page with two hidden fields, one for the activity and the other a timestamp for example. Then on page load run a Server Action saving this to the DB. On re-entry call this to a page called History which the User can review and pick up where they left off…

Hi @Dave,

This is a good feature to have on the page.
But for now I am okay with the current session’s navTabs and if the user closed the browser, then he’ll have to start again.

The problem is, how can I tell which navTab to save to the cookie? How can we know which tab was open at that time? What value or parameter of that specific tab are we going to pass? Sorry I am confused as I don’t know how this will work. :smiley:
Do I just get the tab’s id and “show” it?


After testing, it looks like I can call to open a navtab by toggling the styles for both the navlink and tabpane.

For navlink, the CSS class to use is active, while for the tabpanes the classes are active and show.

By controlling the styles via a query manager variable, I can open a specific tab I want and show its tabpane via URL. Just make sure that the first tab and its tabpane has not set those classes mentioned, and we need to manually set which tab is open initially so that we can toggle appropriately.