本章学习了ASP.NTE页面的一个核心构造块--服务器控件。服务器控件是一种用于页面开发的面向对象方法,它把页面元素封装到可修改和可扩展的组件中。
服务器控件类型包括:Web服务器控件和HTML服务器控件
Web服务器控件的2个特点:必须有ID和runat=“server”
HTML元素加上ID和runat=“server”两个属性后就可转化为HTML服务器控件
常见的HMTL服务器端控件对应的HTML标记:
label----------<span/>
button---------<input type="submit"/>
textbox--------<input type="text"/>
linkbutton-----<a href="javascript:" />
imagebutton----<input type="image"/>
hyperlink------<a />
dropdownlist---<select />
listbox--------<select size=""/>
checkbox-------<input type="checkbox"/>
image-----------<img />
imagemap--------<img ><map /></img>
服务器控件类型包括:Web服务器控件和HTML服务器控件
Web服务器控件的2个特点:必须有ID和runat=“server”
HTML元素加上ID和runat=“server”两个属性后就可转化为HTML服务器控件
常见的HMTL服务器端控件对应的HTML标记:
label----------<span/>
button---------<input type="submit"/>
textbox--------<input type="text"/>
linkbutton-----<a href="javascript:" />
imagebutton----<input type="image"/>
hyperlink------<a />
dropdownlist---<select />
listbox--------<select size=""/>
checkbox-------<input type="checkbox"/>
image-----------<img />
imagemap--------<img ><map /></img>
控件常见属性: