MVC 4在Child Post方法中访问父模型对象 [英] MVC 4 Accessing the Parent Model object in the Child Post method

查看:71
本文介绍了MVC 4在Child Post方法中访问父模型对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


使用MVC 4框架,我有一个父子视图(在Html.Partial中)。我在显示子视图时使用了Jquery对话框。  在我的子视图中,我有一个提交按钮。我希望在回发
子视图时保留我在父视图中输入的数据。是否可以访问父视图的Model对象,以便我仍然可以在子视图的HttpPost 方法中传递父模型对象?谢谢。



问候,


Napster

解决方案

你应该发布到MVC论坛


http://forums.asp.net/1146.aspx/1?MVC


Hi Guys,

Using MVC 4 framework, I have a Parent and Child View (in Html.Partial). I used Jquery dialog in showing the Child View.  In my Child View, I have a Submit button. I want the data that I inputted in the Parent View to be retained upon posting back the Child View. Is it possible to access the Model object of the Parent View, so that I can still pass the Parent Model Object in the HttpPost  method of the Child View? Thanks.

Regards,

Napster

解决方案

You should post to the MVC forum

http://forums.asp.net/1146.aspx/1?MVC


这篇关于MVC 4在Child Post方法中访问父模型对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆