Note that there are some explanatory texts on larger screens.

plurals
  1. POA global variable like cookie which retains value after postback, but it should save different value for different instances (tab/window)
    primarykey
    data
    text
    <p>This is an MVC3 web application. In the <code>_Layout.cshtml</code> shared view, there is a left-nav tree for loading pages on the right of the left-nav. On every tree list item click, it will refresh the page to load the appropriate page with the same Layout view.</p> <p>In this _Layout.cshtml, there is a <code>Select Category</code> link and an empty div (<code>targetDiv</code>) below the tree. Select Category link will open a jQuery UI modal dialog with a webgrid and shows all the 'categories'. On clicking on any 'category' link in the table, the dialog will close and targetDiv will be reloaded by AJAX, so that a webgrid inside targetDiv populates all the 'books' in this 'category'.</p> <p>And if an user clicks on any left-nav item, the whole page reloads. So I need to retain the 'books' list of the selected 'categories'. For this, I save a cookie (CategoryId) when a 'category' is selected in modal dialog. On page reload (document ready) I'm using this cookie in _Layout page which again populates all the 'books' in this 'category'.</p> <p>This is working fine, but the new requirement is to allow working on multiple 'Categories'. If I select 'Category 1' in one tab of a browser and get all books by this category, in the next tab (another instance of same app), I should be able to work on a different 'Category' and so different collection of books. In this case, I cannot use cookie because cookie is shared across all the tabs.</p> <p>How will I set different 'Categories' on different instances (browser tabs/window)?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload