我应该在Asp.Net mvc应用程序中使用哪种控件I.E.服务器控件或Html控件 [英] Which Control Should I Use In Asp.Net mvc Application I.E. Server Control Or Html Control

查看:68
本文介绍了我应该在Asp.Net mvc应用程序中使用哪种控件I.E.服务器控件或Html控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在学习MVC。所以告诉我要获得更好的性能我应该使用什么类型的控件。

即服务器控制或html控件

如文本框,按钮,单选按钮等。



Thanyou

hey
I am learning MVC . so tell me to get better performance what type of control should i use .
i.e. sever control or html control
like textbox, button,radio button etc.

Thanyou

推荐答案

如果你在MVC中使用ASP.NET Webform服务器控件那么使用ASP是没有意义的.NET MVC。在ASP.NET MVC中,请使用普通的html控件。这样做的好处是你可以完全控制html。对于网格和其他一些额外控制,您可以下载免费插件来实现这一点。在性能方面,ASP.NET MVC优于webform,因为它完全是无状态的,或者没有ViewState。另外一个优点是可维护性,单元测试等。

希望这有帮助
If you are using ASP.NET Webform server control in MVC there is no point of reason using ASP.NET MVC. In ASP.NET MVC please use the normal html controls. The Advantage of this are you got the full control over html. For grids and some othet extra control you can download free plugins for implementing this. In the case of performance ASP.NET MVC is better than the webform because it is completely stateless or there is no ViewState. Also another advantages are Maintainability,Unittesting etc..
Hope this helps






ASP.NET MVC不支持服务器控件,所以你应该使用另一个选项意味着HTML控件,但我想给你一个建议,你应该使用提供内部HTML控件和esay来使用的HtmlHelper。在这里查看HTML帮助 http://www.w3schools.com/aspnet/mvc_htmlhelpers.asp [< a href =http://www.w3schools.com/aspnet/mvc_htmlhelpers.asptarget =_ blanktitle =新窗口> ^ ]



谢谢,

Sandeep
Hi,

ASP.NET MVC doesn't support server control so you should go with another option means HTML control but I want to put a suggestion for you that you should use HtmlHelper that provides inbuild HTML control and esay to use. Get a look here of HTML Helper http://www.w3schools.com/aspnet/mvc_htmlhelpers.asp[^]

Thanks,
Sandeep


这篇关于我应该在Asp.Net mvc应用程序中使用哪种控件I.E.服务器控件或Html控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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