0

I built a wizard in MVC, that basically uses the entire wizard model (with its innner steps), showing always the current step, and serializing the wizard model on a hidden file (it's always for light-weight step models). What I want to do now is preventing user to re-post information, specially on final step, where the process finally gets written on database. I don't want to check for duplicates on server side, but I can't figure out how to expire previous pages, or prevent post when page is refreshed on client side.

I guess it's a common situation, but I've googled it with no more results than including some meta-tags in header that didn't do the trick for me, or maybe I'm not including them properly (on get/post actions)

    context.Response.Expires = 0;
    context.Response.Cache.SetExpires(DateTime.MinValue);
    context.Response.CacheControl = "no-cache"; 

NOTE: User is logged in with aspnet coockie, I need to keep this information.

Chuck Norris
  • 963
  • 1
  • 9
  • 17
  • do you mean this http://stackoverflow.com/questions/442678/preventing-double-http-post ? – Vladimir Shmidt Apr 30 '13 at 15:03
  • Maybe an example inplementation would be nice, tough. I remember seeing forms in web that showed me an "experied" page if re-post or back button was pressed on certain circunstanced... they didn't seem to be handled from server side. – Chuck Norris Apr 30 '13 at 15:18

0 Answers0