请大家一起来总结一下html控件与web控件的区别。
小问题:
1.何时用html控件,何时用web控件,有讲究吗?
2.web控件的功能真的比html控件强大吗?(例如:文本框响应回车以自动完成一些操作,用html的Text Field很容易实现,而web的TextBox就不知该如何做)小弟刚开始学asp.net,请大伙多多捧场!
小问题:
1.何时用html控件,何时用web控件,有讲究吗?
2.web控件的功能真的比html控件强大吗?(例如:文本框响应回车以自动完成一些操作,用html的Text Field很容易实现,而web的TextBox就不知该如何做)小弟刚开始学asp.net,请大伙多多捧场!
解决方案 »
- 如何使得用户在注册或登陆后,不管切换哪个页面都处于登陆状态
- 按钮的问题
- asp.net 2.0 缓存 ??什么来的?好像我从来没用过.
- 面对新的东东,真的好难接受!!!请教!!!
- 关于Repeater控件动态加载ItemTemplate模板的问题?
- 我的系统是 WIN2003 做ASP应该安装什么软件~~!高手指点!!!!!!
- 新手有难
- 在ASP.NET中使用Web判断网络文件是否存在问题,请教各位大虾?
- 很简单的初级问题:连 HelloWorld()也运行不了,到底哪儿出错了?
- 几个关于ASP.NET的小问题,来者有分!(使用从C#)
- 在代码(*.cs)中如何调用javascript的函数 在线等!!!!
- 感谢CSDN网友的支持,小弟经过一段时间的努力终于建成自已的个人网站(Aspx+sql+xml),希望大家给点意见!祝各位网友圣诞快乐!
关于Web控件的说明和使用
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.2052/vbcon/html/vboriWebUserControls.htmHTML控件
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.2052/vbcon/html/vboriSimpleHTMLControls.htm
! You prefer an HTML-like object model. HTML server controls have almost
the same HTML as the basic HTML controls. HTML server controls also
have server-side functionality just like Web server controls.
! You are working with existing HTML pages and you want to quickly add
Web Form functionality. Because HTML server controls map exactly to
HTML elements, you do not need to replace controls and risk substitution
errors or page formatting problems.
! The control needs to run both client-side and server-side script. You can
write a client-side script and target a regular HTML control because the
controls are visible in the client. At the same time, you can have server-side
code because it is also a sever control.
! Bandwidth is limited and you need to do a large amount of client side
processing to reduce bandwidth usage.
Use Web server controls if:
! You prefer a Visual Basic-like programming model. You will be able to use
object-oriented programming, identify controls by their ID attribute, and
easily separate the page logic from the UI. With Web server controls, you
can also create applications with nested controls and catch events at the
container level.
! You are creating a Web page that might be viewed by a variety of browsers.
Because the logic inside the Web server controls is able to create HTML
that is tailored to the features that are available in the client’s browser, you
can write for the latest browsers without worrying about browser errors
keeping your less up-to-date users from accessing all of the Web page
functions.
! You need specific functionality, such as a calendar or advertisement, or ad
rotator, that is available only as a Web server control.
! Your bandwidth is not limited and the request-response cycles of Web
server controls will not cause bandwidth problems.