c# - MVC 4 Submit button in each row of a "grid" - how to? -
how can have submit button in each row of "grid", where, when button clicked, can post 3 pieces of data in row controller?
here's scenario:
a screen shows system's users in html table "grid". 1 link in each row says "associate customer". goes screen showing list of customers user can associated with. userid in url associatecustomer/14
on second screen, want display in html grid, customerid, customername, , link/button either:
- says "associate" if aren't associated customer, or
- says "disassociate" if associated customer
i got working, don't know next part: when user clicks button on grid, need pass customerid, userid, , "associate/disassociate" controller. how can in mvc way?
something like:
@ html.actionlink("click me!","associate","somecontroller",new{userid=item.userid,customerid=item.customerid})
you don't have post form asking (though 1 way it).
Comments
Post a Comment