"Caching" Content

2 posts, 0 answers
  1. James
    James avatar
    37 posts
    Member since:
    Sep 2014

    Posted 05 Jan 2015 Link to this post

    I have a form using various Kendo widgets (i.e. TextBoxFor, AutocompleteFor, etc) to capture data for my process.  When I submit the form and try to load view with an empty version of my viewmodel, much of the content in the view is from my previous screen when I use both TextBoxFor and AutoCompleteFor.  However, if I switch these to MaskedTextBoxFor everything seems to work fine.  

    For example, I have an Address view capturing an address with John Doe 123 Main, NYC, NY and click submit to send it to my controller.  In my controller I create a new Address object and pass it back to the Address View.  When the View loads and I am using TextBoxFor or AutoCompleteFor, the contents to the boxes is still John Doe 123 Main, NYC, NY.  However if I change any of the fields to MaskedTextBoxFor, the correct data is displayed in the field.

    Sorry if this is confusing, but I am not sure how to describe this so it makes the most sense.
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 07 Jan 2015 Link to this post

    Hello James,

    If you are returning the view from the same Action method, then the described behavior is expected, because ASP.NET MVC uses PRG model. I would suggest you check this blog post for more details and possible solution/workaround.
    If I am missing something, could you send us a repro demo that will help us to review current behavior locally? This will allow us to follow you up with more details much faster.

    Regards,
    Georgi Krustev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top