Upload
adnan-amin
View
223
Download
0
Embed Size (px)
Citation preview
8/7/2019 Lesson_17 TreeView_Menu Controls
http://slidepdf.com/reader/full/lesson17-treeviewmenu-controls 1/14
BY
Adnan AminLecturer / Software Programmer
Information & Communication Technology (ICT Dept)
www.geoamins.com
8/7/2019 Lesson_17 TreeView_Menu Controls
http://slidepdf.com/reader/full/lesson17-treeviewmenu-controls 2/14
TreeView Server Control.
The Menu control of navigations
By: Adnan Amin (Lecturer / Programmer)2
8/7/2019 Lesson_17 TreeView_Menu Controls
http://slidepdf.com/reader/full/lesson17-treeviewmenu-controls 3/14
A new control that has been introduced
with ASP.net 2.0.
It is quite ideal for displaying what is
contained in your .sitemap file.
It displays the contents of the site map ina Tree structure form.
By: Adnan Amin (Lecturer / Programmer)3
8/7/2019 Lesson_17 TreeView_Menu Controls
http://slidepdf.com/reader/full/lesson17-treeviewmenu-controls 4/14
By: Adnan Amin (Lecturer / Programmer)4
8/7/2019 Lesson_17 TreeView_Menu Controls
http://slidepdf.com/reader/full/lesson17-treeviewmenu-controls 5/14
First create a SiteMapDataSource control
on the page.
The TreeView Control that displays the
contents of your .sitemap file, you mustapply through datasource controls.
The TreeView control doesn’t just bind toyour site map file automatically as
SiteMapPath control does.
By: Adnan Amin (Lecturer / Programmer)5
8/7/2019 Lesson_17 TreeView_Menu Controls
http://slidepdf.com/reader/full/lesson17-treeviewmenu-controls 6/14
By: Adnan Amin (Lecturer / Programmer)6
8/7/2019 Lesson_17 TreeView_Menu Controls
http://slidepdf.com/reader/full/lesson17-treeviewmenu-controls 7/14
8/7/2019 Lesson_17 TreeView_Menu Controls
http://slidepdf.com/reader/full/lesson17-treeviewmenu-controls 8/14
The TreeView control does come with a number of
prebuilt styles right out of the box.
By right-clicking on the TreeView control on your pagefrom the design view in VS-2005, you find the Auto
Format option.
8/7/2019 Lesson_17 TreeView_Menu Controls
http://slidepdf.com/reader/full/lesson17-treeviewmenu-controls 9/14
Another interesting navigation control
also introduced with asp.net 2.0 is the
Menu server control.
This control is ideal for allowing the enduser to navigate a larger hierarchy of
options while utilizing very little browser
real estate in the process.
8/7/2019 Lesson_17 TreeView_Menu Controls
http://slidepdf.com/reader/full/lesson17-treeviewmenu-controls 10/14
8/7/2019 Lesson_17 TreeView_Menu Controls
http://slidepdf.com/reader/full/lesson17-treeviewmenu-controls 11/14
First create xml based site map or xml
file.
Then bind the menu with xml file.Then type the following codes.
y>m id=”form1” runat=”server”>
:SiteMapDataSource ID=”SiteMapDataSource1” Runat=”server” />
:Menu ID=”Menu1” Runat=”server”
DataSourceID=”SiteMapDataSource1”>
p:Menu>rm>
dy>
8/7/2019 Lesson_17 TreeView_Menu Controls
http://slidepdf.com/reader/full/lesson17-treeviewmenu-controls 12/14
8/7/2019 Lesson_17 TreeView_Menu Controls
http://slidepdf.com/reader/full/lesson17-treeviewmenu-controls 13/14
Select SiteMapDataSource control and
then locate a property ShowStartingNode
in Properties windows.
Set ShowStartingNode property value to
false.
8/7/2019 Lesson_17 TreeView_Menu Controls
http://slidepdf.com/reader/full/lesson17-treeviewmenu-controls 14/14
References
• Professional ASP.net by Wrox