我如何在Mvc中这样做? [英] How Do I Do This In Mvc?
问题描述
以发票为例。我有id日期等
它是一个表格。需要添加产品。它是一个不同的模型。但如果我添加局部视图。它变成了表格内的形式。
我在发票视图中开始表格,在部分视图中有ajax表格
我的实际问题是我有发票,我需要使用ajax将产品添加到发票中,并在添加所需产品后保存完整的发票。如何在没有回发的情况下添加产品。
尝试在部分视图中放置ajax开始表单。表单dint不会在现有的发票表单中呈现。
有谁知道。非常紧急。
视图不是表格。
您可以拥有任意数量的部分视图。
Take the case of an invoice. I have id date etc
Its a form. Need to add products. its a different model. But if i add partial view. It becomes form inside a form.
I have begin form in invoice view and ajax form in partial view
My actual problem is i have an invoice and i need to add products to the invoice using ajax and save the complete invoice after adding required products. How to add products without postback.
Tried putting ajax begin form in partial view. Form dint not get rendered inside the already existing invoice form.
Does anyone know. Its very urgent.
A view is not a form.
You can have as many partial views as you want.
这篇关于我如何在Mvc中这样做?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!