在ASP.NET与MVC 5和MVC 6中显示控件 [英] Displaying controls in ASP.NET vs MVC 5 vs MVC 6

查看:52
本文介绍了在ASP.NET与MVC 5和MVC 6中显示控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi guys,

I want to use ASP.NET MVC but i am afraid from displaying controls like GridView,

i think it is difficult to use  displaying controls in MVC

Is MVC 6 facilitate using displaying controls than MVC 5 or it is still difficult

I thing it is easy to work with ASP.NET WebForm than MVC

i need your advice from experience people 

Thanks all





我尝试过:



我需要你从经验人员的建议



What I have tried:

I need your advice from experience people

推荐答案

ASP.NET Web Forms和MVC彼此非常不同。 Web窗体用户服务器控件并且非常受事件驱动。 MVC是一个完全不同的范例,也是MS所接受的范例。



我不是主张一个,而是每天使用这两种技术,但是在过去的几年里,我一直专注于MVC,今天我实际上花了大部分的开发时间来使用它。



你觉得使用MVC有什么困难?我猜它会绑定,或者在屏幕上放置一个控件和一些配置,并且你有数据。虽然MVC没有给你这种简单,但它很容易使用。



你必须从Web Form开始,对吧?采用相同的方法来学习MVC。找一本好书,一堂课,甚至可以从www.asp.net开始。
ASP.NET Web Forms and MVC are very different from one another. Web Forms user Server Controls and is very much Event driven. MVC is a completely different paradigm and one that MS has embraced.

I am not advocating for one over the other I work with both technologies on a daily basis, but over the last several years my focus has been on MVC and today I actually spend most of my development time using it.

What are you finding difficult about working with MVC? I would guess it binding, or dropping a control on screen and a little configuration and presto you have data. While MVC does not give you this simplicity it is simple to work with.

You had to start somewhere with Web Form, right? Take that same approach to learning MVC. Find a good book, a class or even start at www.asp.net.


如果您使用的是GridView,因为如果没有它就无法模拟该功能,那么您很可能更好地坚持使用WebForms。如果你想转向MVC将会有一个很大的学习曲线,你将不得不掌握WebForms隐藏的大量概念。



要回答你的具体问题,在MVC中没有像gridview等一样的开箱即用的东西,你几乎必须自己实现一切,但显然有人写的第三方库和扩展将有助于你可以毫不费力地获得功能。
If you are using a GridView because you couldn't possible emulate that functionality without it then you're probably better sticking with WebForms. If you want to move to MVC there is going to be a large learning curve, you're going to have to get to grips with a lot of concepts that WebForms hides\abstracts from you.

To answer your specific question there is nothing out of the box like gridview etc in MVC, you pretty much have to implement everything yourself, but there are obviously third-party libraries and extensions people have written that will help you get the functionality without the effort.


这篇关于在ASP.NET与MVC 5和MVC 6中显示控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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