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

  • SEARCH
  • Home
  • 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 6726817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:58:22+00:00 2026-05-26T09:58:22+00:00

I ran into an issue that I can’t seem to fix, or even get

  • 0

I ran into an issue that I can’t seem to fix, or even get around. In my View, I have the following:

@Html.Hidden("IsLocked", (Session["IsLocked"]) ? "true" : "")

The Session[“IsLocked”] variable is set in my BaseController, which all of the other controllers inherit from. However, I have found that if I visit a page, and it is not currently locked, and perform the lock operation and revisit it, it will not change the value of “IsLocked”.

I can’t seem to figure out why it isn’t changing, even though the Session value has changed?

  • 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-05-26T09:58:23+00:00Added an answer on May 26, 2026 at 9:58 am

    It sounds like you are running into a caching issue, as the pages are being cached with their initial value and despite the value changing, when the page is requested it will simply pull from the cache.

    You can use the OutputCache Attribute, to assist with disabling caching for these purposes. The following will ensure that your actions / pages are not cached and that data is always “fresh”:

    [OutputCache(NoStore = true, Duration = 0, VaryByParam = "None")]
    public abstract class BaseController : Controller
    

    The above can be placed over any controller or action to disable caching for that particular event. (In the above context, if placed on the BaseController, it would effectively disable caching for every controller that derives from BaseController)

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

Sidebar

Related Questions

Has anyone ran into this issue? We have a mobile site that can't use
I currently ran into the issue that I do not have the money to
I ran into an issue that can only be explained with my fundamental lack
I ran into an issue with something that I am probably just overlooking. I
I have ran into an interesting issue while trying to create a more usable
I ran into an issue with some third party software that we use to
I ran into this issue quite a few times. Let's say I have a
I recently ran into some issues with android.os.Bundle that I hoped to fix by
I have binary data in a file that I can read into a byte
I've ran into a design issue; in a project, i have three tables: League,

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.