问题描述
如何在不使用第三个模型的情况下将两个模型传递到mvc 5中的单个视图。我知道我们可以创建另一个模型,在内部我们可以创建前2个模型作为属性并发送到第三个模型。但我不使用它和viewbag,viewdata和临时数据。请告诉我他们以任何方式传递数据
我们可以创建另一个模型,在里面我们可以创建前2个模型作为属性并发送到第三个模型。我成功。但我的马槽问不要那样用,他说我不应该使用viewbag,查看数据和tempdata
How can i pass two model to single view in mvc 5 without using third model. I know we can create another model and inside that we can create first 2 models as properties and send the to third model. But I don't use that and viewbag,viewdata and temp data. Please tell me is their any way to pass data like that
we can create another model and inside that we can create first 2 models as properties and send the to third model. I succeed. But My manger asking don't use like that and he told me i should not use viewbag,view data and tempdata
推荐答案
这篇关于如何在不使用第三个模型的情况下将两个模型传递到MVC 5中的单个视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!