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 576567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:03:40+00:00 2026-05-13T14:03:40+00:00

I have a situation that I can’t seem to find any help on. I

  • 0

I have a situation that I can’t seem to find any help on. I looked through many questions on here, but can’t seem to find anybody that has asked (or answered) my specific question. Here it is:

Assume I have 2 categories:

  • Paper (id: 1)
  • Plastic (id: 2)

The user clicks on Paper, change the name to Plastic, and click ‘Submit’.

Inside my controller I discover that there is a already a category named Plastic so I re-sends the page to the user with a friendly message.

The problem arises when the user decides to not change the value, and instead navigate away from the page. They do some other things and then click on Paper again to change it’s name. Only this time they actually see the name Plastic in the textbox!?

I have this problem on all of my controllers when I reject invalid form data. How do I fix this problem?

  • 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-13T14:03:40+00:00Added an answer on May 13, 2026 at 2:03 pm

    I just wanted to answer this question myself to indicate my question was answered by queen3 in a comment. I discovered that the value was coming back from my LinqToSql with the invalid value.

    The way that I fixed the issue was by registering the Castle Windsor PerWebRequestLifestyleModule http module like so:

    <httpModule>
     <add name="PerRequestLifestyle" type="Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule, Castle.MicroKernel" />
     ...
    </httpModule>
    

    Then I went to each component and set the lifestyle to PerWebRequest like so:

    <component 
        id="..."
        service="..."
        type="..."
        lifestyle="PerWebRequest">
    
        ...
    
      </component>
    

    Thanks queen3!

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

Sidebar

Related Questions

Apparently I have a unique situation that I can't find help with anywhere. I'm
I have a situation that I can't seem to resolve. It is causing a
I have an situation here that looks very like a SELECT N+1 from the
I am new to rails, and have a situation that I can't quite get
This is a really odd situation that I can't seem to work out where
I have a situation like this http://jsfiddle.net/9cRpe/ . You can see that the &#09
I have a somewhat unique situation that I can't quite get working. I've followed
I find myself in a situation that someone else must have got stuck in
I have strange situation - when I'm trying to update model, that can contains
I have a situation that I can not wrap my head around at the

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.