如何在MVC中执行插入操作并在网格中显示数据 [英] How to perform insert opertaion and display data in grid in MVC
问题描述
大家好,
我创建了一个视图,我必须创建记录并在MVC4.0中以网格显示。
当我们使用单独的数据插入和显示记录视图时,每件事情都可以正常工作。
但我们将这两个功能结合使用然后它不起作用。对于插入,我们使用@model MvcApplication1.Models.ClassXyz at查看的顶部
和我们使用@model IEnumerable< mvcapplication1.models.classxyz> ;.
有没有办法在单一视图中使用强类型实现这两种功能。
谢谢&问候
Mohd Wasif
Hi All,
I have created a View in that I have to create records and display in grid in MVC4.0.
Every thing works fine when we use separate View for Data Insertion and Display Records.
But we use these two functionality together then it does not work.For insertion we use @model MvcApplication1.Models.ClassXyz at the top of the View
and for Display we use @model IEnumerable<mvcapplication1.models.classxyz>.
Is there any way to use both functionality in a single View with Strong Type Implementation.
Thanks & Regards
Mohd Wasif
推荐答案
这篇关于如何在MVC中执行插入操作并在网格中显示数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!