ASP.NET MVC controller actions design

后端 未结 4 1770
无人共我
无人共我 2020-12-30 09:51

I really like the way ASP.NET MVC works. I\'d love to implement it on all new web projects moving forward, but I hit a snag in a prototype the other day that I really haven\

4条回答
  •  孤城傲影
    2020-12-30 10:45

    You can have as many controllers as makes sense; that layout looks reasonable. Note that routes don't have to map directly to {controller}/{action}, but it keeps things simple. Looks fine to me - except I'd probably have ThankYou as a view - i.e. the Register [GET] perhaps uses a different view to Register [POST]

提交回复
热议问题