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

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -