Quantcast
Viewing all articles
Browse latest Browse all 31

Harry on ASP.NET MVC - Using Post, Redirect, Get Pattern

Great article, I was wondering what the best practise was for sending view data from submit to create via a redirect... One thing that can save a little time (and I'm sure this was left out for clarity) is to use: BindingHelperExtensions.UpdateFrom(viewData, Request.Form, "create"); To populate the view data, then: TempData["createViewData"] = viewData; Before the redirect. Note that I store the validation errors on the view data between those two lines. Thanks for posting Image may be NSFW.
Clik here to view.
Smile

Viewing all articles
Browse latest Browse all 31

Trending Articles