How do I prevent ASP.NET MVC from caching invalid data in my View? -


I have a situation that I have not received any help. I have seen through many questions here, but unable to find any person who has asked my specific question (or answer)

  • Plastic (id: 2)
  • Click on user paper , change name to plastic , and click on 'Submit' Click.

    Within my controller it is found that there is already a class named plastic , so I send the user a message with a friendly message.

    The problem occurs when users change the value not , and instead navigate away from the page. They do some other things and then click on paper to change its name. Only this time they actually see the name in the plastic text box!

    I have this problem on all my administrators when I decline invalid form data. How do I solve this problem?

    I wanted to answer the question myself that my question was answered by comment. I came to know that the value was coming back with my invalid value from LinqToSql.

    The way I have fixed this issue, he was recording Castle Windsor PerWebRequestLifestyle module http module like this:

      & Lt; HttpModule & gt; & Lt; Add name = "PerRequestLifestyle" type = "Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule, Castle.MicroKernel" /> ... & lt; / HttpModule & gt;  

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

      & lt; Element id = ". .." service = "..." type = "..." lifestyle = "pirvevirquet" & gt; ... & lt; / Component & gt;  

    Thanks!


    Comments

    Popular posts from this blog

    oracle - The fastest way to check if some records in a database table? -

    php - multilevel menu with multilevel array -

    jQuery UI: Datepicker month format -