Thread: View Refresh?
View Single Post
  #1 (permalink)  
Old August 23rd, 2011, 01:09 PM
lcbenson lcbenson is offline
Registered User
Points: 12, Level: 1
Points: 12, Level: 1 Points: 12, Level: 1 Points: 12, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Aug 2011
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default View Refresh?

I am having an issue with MVC3 Views not refreshing which is the main reason I purchased the book though I am happy to have it.

Summary of problem:
1. I have a view with a table that gets loaded with a collection of Model items for a WCF Service. Also has a create item link
2. I click the create item link which takes me to a create item view (form). I complete the form and submit, the database gets updated and by debugging I can verify that the class variable in the HomeController (list of items) includes the new item created.
3. Submitting the form take me to an Item Details View, displaying the properties of the item I just created. The Details View has a Back to List action link.
4. Click the Back to List action link, takes me back to the Item table in step 1 above but no changes are displayed in the table. I can verify that the SQL database has been unpdated as well as the Class variable in HomeController. Interestingly enough, I put a break point in the action controller and when I click on the “Back to List” actionlink from the Details View, the code in the HomeController is not even invoked! Its like it isn’t even trying to do anything.

So I thought that maybe the view was being cached, I tried everything I could find online about disabling caching to no avail
I can’t help feeling like I am missing something basic. Any help would be greatly appreciated.