中にURLパラメータを維持:MVC私は現在、次のURLの形式を設定しているポスト
:http://localhost/mySite/inventory/create/26/1
これは、フォーム送信ボタンがどのように見えるactionMethod
[HttpGet]
public ActionResult create(int exId, int secId)
[HttpPost]
public ActionResult create(MyModel model, int exId, int secId, FormCollection form)
に行きます
@using (Html.BeginForm("create", "inventory", new { @exId= Model.ExId, @secId= Model.SecId}, FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
および
ポストが発生したときに、今のURLがに変更され、/作成/ 1分の26:私の質問をされたのと、URLを保つために、ポストの間にとにかくあり
http://localhost/mySite/inventory/create?exId=26&secId=1
保つためにとにかくがありますそれはどのようにそれを持っているかのように、/ create/26/1?
GenreatedマークアップのフォームメソッドがPOSTに設定されていますか? – Shyju
@Shyjuはい、