c# - asp.net mvc razor getting id with post -
how can querystring id in there? there way
@using (html.beginform("informvendor", "procurement",new {id="querystring mode = "inform" }, formmethod.post)) { <tr> <td> @html.dropdownlistfor(m=>m.vendorid,new multiselectlist(model.vendordropdownlist, "customerid", "contactname")) </td> <td> @html.checkboxfor(m => m.isemail) </td> </tr> <tr> <td> <input type="submit" id="btnsubmit" value="nominate vendor" /> </td> <td></td> </tr> }
the easiest way have id field hidden. way user doesn't see id field post controller does.
@html.hiddenfor(x => x.yourid)
Comments
Post a Comment