Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8241937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:00:01+00:00 2026-06-07T21:00:01+00:00

This is an MVC3 web application. In the _Layout.cshtml shared view, there is a

  • 0

This is an MVC3 web application. In the _Layout.cshtml 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.

In this _Layout.cshtml, there is a Select Category link and an empty div (targetDiv) 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’.

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’.

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.

How will I set different ‘Categories’ on different instances (browser tabs/window)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T21:00:04+00:00Added an answer on June 7, 2026 at 9:00 pm

    I’ve solved this problem. I’ve used Cookie-less Session Variables in JavaScript. It basically stores your data in the window.name property which does not get cleared when you reload the page. And every tab has a different window object (this is what I want) and is supported in all major browsers.

    This is just like session cookies, only difference is this data won’t survive between windows/tabs which normal session cookies does.

    Also see Session variables without cookies.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is about asp.net mvc3 web application. We have used Object cache to store
This is for an ASP.NET MVC3 web application. In RegisterRoutes I have the following
I'm working on an MVC3 web application using the razor view engine. I'm looking
We have an ASP.NET MVC3 web application. We generate HTML5 pages. And now, we
in an ASP.NET MVC3 web application. I have a view. the view has a
I am working on an MVC3 web application. One of my requirements is that
I deploy a web application in MVC3, the problem it's that can't the styles
I'm working on a MVC3 web-application and encounter a problem when passing values from
I am developing a web application in ASP.NET MVC3 with C# and Razor. I
Whenever I create a new Empty MVC3 Web Application project in Visual Studio 2010

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.