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 ?

enter image description here

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

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -