开发者

Model binding List and creating single object

I have model in a view like this

@model List<Products>

I can itereate over it and show all the products. But on click of add button, I want to show a popup which will add a product (sending request to creat开发者_C百科e action).

public JSONResult create(Product P) {}

Create form is also on same page, so how I will only send a newly single product?


You may find the following blog post useful.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜