This is a migrated thread and some comments may be shown as answers.

"Caching" Content

1 Answer 134 Views
AutoComplete
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 05 Jan 2015, 05:17 PM
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.

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 07 Jan 2015, 11:37 AM
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.

 
Tags
AutoComplete
Asked by
James
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or