Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Build Your Own ASP.NET 2.0 Web Site Using CSharp And VB (2006) [eng].pdf
Скачиваний:
74
Добавлен:
16.08.2013
Размер:
15.69 Mб
Скачать

HTML Server Controls

Target

specifies the target window or frame in which content associated with a menu item should be displayed when that item is clicked; possible values are _blank,

_parent, _search, _self, and _top

Methods

CollapseAll

collapses all nodes

DataBind

binds the control to its data source

ExpandAll

expands all nodes

FindNode

returns the TreeNode object located at the path spe-

 

cified by the string parameter

Events

 

SelectedNodeChanged

fires when the currently selected item changes

TreeNodeCheckChanged

fires when a checkbox changes state

TreeNodeCollapsed

fires when a node is collapsed

TreeNodeExpanded

fires when a node is expanded

TreeNodePopulate

fires when a node that has its PopulateOnDemand

 

property set to True is expanded

HTML Server Controls

When HTML tags are used in an ASP.NET page, they’re ignored by the server and passed to the browser unchanged; the browser renders them as it would any other HTML page. The simple addition of the runat="server" attribute turns an HTML tag into an HTML control, which we can then access and alter through our code by means of the identifier given in the control’s id attribute. The following reference lists all the useful properties, methods, and events of ASP.NET’s HTML controls.

643