1. What is TreeView?
TreeView is an ASP.NET server control that can generate a user interface for displaying hierarchical data.
2. Applicable data structure:
Applicable stratified data sets, folder views, and other similar data structures.
3. How to implement TreeView?
(1) Create a declaration
(2) The client or server is programmed in a variety of ways
4. TreeView creation method:
(1) Manual creation
(2) Create TreeView Editor in VS.NET
5. TreeView elements
TreeView defines a treeview
TREENODETYPE Defines a node type to apply one or a set of nodes in TreeView
Treenode creates a node in TreeView
Note:
TreeView is container for Treenode and Treenodetype
These elements jointly define the structure, layout, and outside of the number view.
View. TreeView cannot contain anything other than these three elements
HTML element
6. Write simple TreeView
(1). Create a web application, named: WebControls
(2). Create an empty page
(3). Add a namespace reference, add "<% @ Import namespace =" Microsoft.Web.ui.WebControls "%>"
(4) Add @ register instruction
Add:
<% @ Register tagprefix = "mytree"
Namespace = "Microsoft.Web.ui.WebControls"
AskMBLY = "Microsoft.Web.ui.WebControls, Version = 1.0.2.226, Culture = neutral, publickeyToken = 31BF3856AD364E35"%>
(5). Add a document structure
hEAD> body>Html>
(6). Add FORM
All webcontrol elements must be established in an FORM element