相同视图mvc 4.0中的两种不同的动作方法(创建,细节) [英] Same view two different action methods in mvc 4.0(Create,details)

查看:67
本文介绍了相同视图mvc 4.0中的两种不同的动作方法(创建,细节)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





在mvc 4.0

我的要求是

在创建视图中,插入时存储数据库的数据,它将在同一个创建视图中并排显示为gridview格式,并排



在一个页面(视图)中,一边是文本框,按钮控件另一边是gridview控制



任何人都可以帮助我...

解决方案

你好,

如您所希望的gridview格式记录所示。然后查看此网址。



在带有数据库的ASP.NET MVC中使用JavaScript进行双向绑定 [ ^ ]


我想你想要详细信息以及在同一页面中创建表单。



为此,您可以使用局部视图。在您的局部视图中,只需复制您创建页面的所有内容并将其粘贴到那里。



然后在页面中渲染您想要查看详细信息的局部视图

Hi,

In mvc 4.0
My requirement is
In Create View, when I insert data to store the database and it will be shown as gridview format in same create view, side by side

In one page(view) one side is textbox,button controls and next side is gridview control

can any one help me...

解决方案

Hi ,
as you want gridview format records show . then View this url.

Two Way Binding using JavaScript in ASP.NET MVC With Database[^]


I think you want details as well as create form in same page.

To achieve this you can use partial view. And in your partial view just copy all the contents of your create page and paste it there.

Then render the partial view in your page where you want to see the details.


这篇关于相同视图mvc 4.0中的两种不同的动作方法(创建,细节)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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