How to obtain data from a form using method=“post”? How to request it data in my controller?

后端 未结 4 1085
隐瞒了意图╮
隐瞒了意图╮ 2020-12-22 05:19

I am trying to obtain data from my html code like the \"acquringCode\", \"cardAcceptor\", and \"merchantId\". I can\'t figure how how to obtain that data in my controller.

4条回答
  •  囚心锁ツ
    2020-12-22 06:02

    Please try by adding the FormCollection parameter to the action AddSaveTreventLocationLookup

    Like this:

    public ActionResult AddSaveTreventLocationLookup(FormCollection formCollection)
    {
    
    // now you can get the values you want
         string acquiringInstitutionIdentificationCode = formCollection["AcquiringInstitutionIdentificationCode"];
    .......
    

提交回复
热议问题