ASP.NET How to Post a Master-Detail Views
I need to post the data from an Order-Details Page..
I have a page with开发者_StackOverflow中文版 fields for Order Info. Inside it is a user control for the Details Info. New rows can be added to the details info.
Here are the fields:
Order
Customer (textbox) Order Date (textbox)
Details(multiple)
Description (textbox) Qty (textbox) Price (textbox) Amount (textbox)
When i click the Submit button. I need to get the values of Order and Details and pass it in the controller.
How can i do this in MVC?
By the way, this is Create page.. so Order ID is not yet generated
Assuming you are using MVC1, is there any reason that you don't just have the page strongly typed for the <Order>, and the usercontrol is a partial view strongly typed for a list of type <Detail>, and the usercontrol is invoked by passing the order id so that the appropriate details are returned and rendered by the partial view?
精彩评论