Quantcast
Channel: eWorld.UI - Matt Hawley - ASP.NET MVC - Using Post, Redirect, Get Pattern
Viewing all articles
Browse latest Browse all 31

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

$
0
0
I must admin, I don't follow what's special here. Apparently I've been using the long lost PRG pattern since the early ASP.NET betas:

- Create.aspx button SubmitButton is clicked
- if (! IsValid) return; causes the page to re-render with a validator error message
- Create.aspx button SubmitButton is clicked again
- this time validation passes, item is created, at the end of SubmitButton_Click method we do a Response.Redirect("Confirm.aspx ...")

Looks just as trivially easy to me. Can also do a Server.Transfer to avoid using Session and/or QueryString.

Viewing all articles
Browse latest Browse all 31

Trending Articles