2

Now that the next version of ASP.NET MVC is being prototyped and previewed (ASP.NET MVC 3 Preview 1 came out a couple of weeks ago), I wonder if we should call the attention of the Core Dev team (S Hanselman, Phil Haack and all) to this "feature."

Is there a easy/non tacky way of associating subdomains → areas?

Something like:

http://admin.example.com/ → Mapped to Area = Admin
http://www.example.com/managers/ → Mapped to Area = Managers
http://www.example.com/admin/ → Invalid (since the dev has chosen to map admin as a sub domain).

Also, whats the best accepted design pattern in implementing PRG pattern in ASP.NET MVC? I guess it should also get some official loving in MVC 3.

Pops
  • 30,199
  • 37
  • 136
  • 151
kidoman
  • 2,402
  • 5
  • 26
  • 35

1 Answers1

0

Post Redirect Get (PRG) in ASP.NET MVC is as simple as POST to the controller, the controller returns a RedirectToAction (a 302 IIRC) and the browser GETS the url in the response.

If you're developing for mobile beaware that some Nokia browsers (Series 40 IIRC) don't handle 302 correctly; instead of GETing the url they rePOST to the url. I've see examples where RedirectToAction has been extended to send a 301 under these circumstances which the browser correctly GETs.

Scott Rickman
  • 560
  • 5
  • 10
  • I was developing an application in ASP.NET MVC 2, and I ran into a situation where I had to pass data (validation, model) during a redirect using a non standard library. Is there a better accepted way of doing it? – kidoman Oct 22 '10 at 12:46