简体   繁体   中英

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 ?

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.

The best way is to create a ViewModel classes and declare View as strongly typed. 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 Server Controls should not be used in this framework... or rather, you should not use anything that relies on postbacks and/or viewstate. There are tricks to get some to work, but YMMV.

If the control is an ASP.NET MVC Control, that's a different story, and it will work ok. JQuery controls also work since they are javascript controls.

use the MvcContrib grid. it is working fine

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM