Wednesday 15 April 2015

c# - how to refresh my page when returning a view -


After redirecting to the page, I am redirecting to a page. However, I can actually see these changes only after reloading the whole page.

I am redirecting to this page this way:

  public action details statement (string id) {return see (function (id)); }   

Is there something that I can add to my parameter which can refresh the page?

OK This is a common mistake that people make to deal with ASP.Net MVC. You want to redirect properly, instead you do not want to return View .

  Public Action Detail Description (String ID) {// Actual Redirect Redirect Redirection Tiection ("Function", new {id}); }   

This will ensure that your controller performs a real redirect, and not only displays the view. It also ensures your routes / URLs. Hope this helps :)

No comments:

Post a Comment