c# - how to catch id in aspx page in MVC -
i'm working on mvc production project.
in production details view have buttons more data database, need id of product. can see exist can catch it?
here's controller return data:
public actionresult details(long aproductionorderid) { productionorderlist item = new productionorderlist(); item = productionorderreg.getproductionorders(conn, aproductionorderid); viewdata["item"] = item; return view(); }
here's details page when load, can see id, how catch , use in buttons in left bring more date ?
you use hidden input on view page submit id.
your view:
<form method="post"> <button type="submit">button text</button> <input type="hidden" name="aproductionorderid" value="@viewdata['item']"> </form>
Comments
Post a Comment