SQL    
 
database database
spacer
spacer Aboutspacer Contact Us Free Tour Homespacer Joinspacer Member Login Price spacer
spacer spacer  
 

Populating the TreeView Control from a Database

 

 

Introduction

TreeView is a new Internet Explorer WebControl for ASP.NET that presents hierarchical datasets, folders, and XML documents in a familiar parent child view similar to the Windows File Explorer. This article will provide an introduction to the TreeView and then provide detailed steps for populating the tree from a database.

 

 

About the TreeView

Word of WARNING. Developer Beware. Microsoft does not support any WebControl, including the TreeView. They do, however, host a newsgroup and a forum. The newsgroup is located on the public news server: "news.Microsoft.com". The group name is "microsoft.public.dotnet.framework.aspnet.webcontrols". The forum can be found at http://www.asp.net/Forums/ShowForum.aspx?tabindex=1&ForumID=91. Again, Microsoft does not provide any level of guaranteed support for either of these. The TreeView is only one item in the Internet Explorer WebControls download set. The WebControl set also includes the MultiPage WebControl (for creating collections of page areas), a TabStrip WebControl (for authoring tabbed menus and navigation systems), and the ToolBar WebControl (used to create tool bar strips of control buttons). These tools give ASP.NET developers the ability to create Web-based applications that look, feel, and behave like traditional Windows desktop applications. All the controls include automatic browser detection so your pages will render and function in all commonly used browsers. For Internet Explorer 5.5 and above, the controls include DHTML behaviors for client-side functionality. The Internet Explorer WebControls are not part of the .NET Framework and must be downloaded separately.

 

 

Downloading and Installing the WebControls Set

  1. Download the Control from Microsoft at: http://msdn.microsoft.com/downloads/samples/internet/asp_dot_net_servercontrols/webcontrols/default.asp. Save the exe file.
  2. Double click your saved IEWebControls.exe file to begin a typical InstallShield setup. You must have the .NET Framework loaded on your machine prior to installing the WebControls.
  3. Browse to your C:\Program Files\IE Web Controls folder and open the file "build.bat" in an editor. Modify the line with "csc.exe" in it to include the full path to your DOT.NET Framework, for example: "c:\winnt\microsoft.net\framework\v1.1.4322\csc.exe"
  4. Double click or execute the build.bat file we just modified.
  5. Check the newly created "C:\Program Files\IE Web Controls\Build" folder for the file "Micorosoft.Web.UI.WebControls.dll". If it doesn't exist, double check step three.
  6. Follow the remaining steps in the C:\Program Files\IE Web Controls\Readme.txt file for directions on creating and coping file to your IIS directory.
  7. For Visual Studio users: Add the WebControls to the Visual Studio toolbox by selecting Tools, Add/Remove Tool Box Items from the menu. Then browse to the location of your "Micorosoft.Web.UI.WebControls.dll".
  TreeView
  After you're done, TreeView should be listed as a .NET Component with an icon for the TreeView.
 

 

Continued on Next Page

Page 1, Page 2, Page 3, Page 4, Page 5

Download / Print Complete PDF

 

    Contact Us   Free Extras   Site Map