简体   繁体   English

在ASP.NET MVC中显示数据的最佳解决方案是什么?

[英]What is the best solution for displaying data in ASP.NET MVC?

I am new to ASP.NET MVC and I want to know your opinion about what is the best way to display some data from database using a <table> ... an ASP.NET control or a jqGrid ? 我是ASP.NET MVC的新手,我想知道您对于使用<table> ...从ASP.NET控件或jqGrid显示数据库中某些数据的最佳方法是什么的看法

In which situation must each of them be used? 在每种情况下都必须使用它们?

I appreciate any tips. 我感谢任何提示。 Thanks. 谢谢。

如果我理解正确,那么MVC模型不支持标准asp.net控件的服务器端事件处理,因此我想说jquery网格绝对是最佳选择。

Asp.net controls cannot be used in asp.net mvc. 在ASP.NET MVC中不能使用ASP.NET控件。

The best way is to create a ViewModel classes and declare View as strongly typed. 最好的方法是创建一个ViewModel类,并将View声明为强类型。 I could continue but unfortunately don't know what exactly do you need. 我可以继续,但不幸的是不知道您到底需要什么。

Do you mean ASP.NET Controls or ASP.NET MVC Controls? 您是指ASP.NET控件还是ASP.NET MVC控件?

ASP.NET Server Controls should not be used in this framework... or rather, you should not use anything that relies on postbacks and/or viewstate. ASP.NET Server控件不应在此框架中使用...或更确切地说,您不应使用任何依赖于回发和/或视图状态的控件。 There are tricks to get some to work, but YMMV. 有一些技巧可以使一些工作,但YMMV。

If the control is an ASP.NET MVC Control, that's a different story, and it will work ok. 如果该控件是ASP.NET MVC控件,那就是另一回事了,它将正常运行。 JQuery controls also work since they are javascript controls. jQuery控件也是javascript控件,因此也可以使用。

use the MvcContrib grid. 使用MvcContrib网格。 it is working fine 运行正常

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在表asp.net MVC中显示数据? - Displaying data in table asp.net mvc? 在ASP.net MVC v1.0中显示数据集内容的最佳实践是什么? - What is the best practice for displaying the contents of a DataSet in ASP.net MVC v1.0? 将视频嵌入ASP.NET网站的最佳解决方案是什么? - What's the best solution for embedding video into an ASP.NET website? asp.net哪种数据控件最适合显示动态数据 - asp.net which data control best for displaying dynamic data 在ASP.NET中显示缩略图的最佳方法是什么? - What's the best way of displaying thumbnails in ASP.NET? 在ASP.NET MVC中从页面到页面传递敏感数据的最佳方法是什么? - What is the best way to pass sensitive data from page to page in ASP.NET MVC? 在ASP.NET MVC中处理2种不同形式之间的共享数据时,最佳实践是什么? - What is the best practice when handling shared data between 2 different forms in asp.net mvc? 设置用户输入数据的时间限制的最佳方法是什么? (asp.net mvc) - What is the best way to set time boundries for user to input data? (asp.net mvc) 为ASP.NET MVC项目设置数据访问的最佳方法是什么? - What's the best way to set up data access for an ASP.NET MVC project? 托管ASP.NET MVC6应用程序的最佳方法是什么 - What is the best way to host an ASP.NET MVC6 Application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM