服务器控件和HTML帮助程序之间有什么区别 [英] What is difference between Server controls and HTML Helpers

查看:76
本文介绍了服务器控件和HTML帮助程序之间有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



MVC中有HTML帮助程序。现在asp.net服务器控件和HTML助手之间的区别是什么?

为什么我们使用html助手代替asp.net服务器控件?



请帮我这个..

Hello,

There is HTML Helpers in MVC. Now what is the difference between asp.net server controls and HTML helpers?
why we are using html helpers in place of asp.net server controls?

please help me for this..

推荐答案

服务器控件引用WebForms方法,而html助手引用ASP.NET MVC框架方法。



在下面的链接中比较方法,并简要写出优缺点。



http://msdn.microsoft.com/en-us/library/dd381619(v = vs.98 ).aspx [ ^ ]
Server controls refer to WebForms approach, while html helpers refer to ASP.NET MVC framework approach.

On a link below approaches are comparedm and advantages and disadvantages are briefly written.

http://msdn.microsoft.com/en-us/library/dd381619(v=vs.98).aspx[^]


最简单的答案是 -

1.html帮助器在服务器控制时不会创建视图状态。 />
2.html辅助控件是轻量级的。
the best simple answer would be -
1.html helper does not create view state while server control does.
2.html helper controls are light weighted.


这篇关于服务器控件和HTML帮助程序之间有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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