ASP.NET MVC - using the same form to both create and edit

前端 未结 10 898
温柔的废话
温柔的废话 2021-01-30 05:27

Whats the best practice approach to creating a form that is used to both create new models and edit existing models?

Are there any tutorials that people can point me in

10条回答
  •  独厮守ぢ
    2021-01-30 05:52

    It could be (should be IMO) one controller but different controller actions. Also make sure you have proper HTTP verbs associated with appropriate action. Follow the tutorial posted by E Rolnicki and you will be on your way!

    Happy Coding!!

提交回复
热议问题