一、 使用TreeView控件
a) 下载并安装IEWebControls:http://www.asp.net/IEWebControls/Download.aspx
b) 安装完以后,默认状态下会建立一个目录:\Program files\IEWeb Controls\,当然你也可改变安装目录。找到这个目录,双击build.bat文件执行,它会建立一个名为build的子目录,并且编译在src目录下的源文件,把编译结果和Runtime目录复制到build子目录中(自动)。在这个动作之后,在build目录下应该会有一个叫"Microsoft.Web.UI.WebControls.dll"文件和一个Runtime子目录。为了能在ASP.NET的Web应用程序中使用这个控件,你必须把\build\Runtime子目录下的内容复制到Web应用程序的 /webctrl_client/1_0子目录中,并且把"Microsoft.Web.UI.WebControls.dll"这个文件复制到Web应用程序的/bin目录下。这个过程在Readme.txt文件有详细的说明,不过是英文的。
c) 然后,你就可以在Toolbox中添加一个工具了(这个不用说明了吧)
d) 以下是WebControls的说明书(E文)
To run the IE Web Controls:
1. Copy the contents of the Runtime directory to the webctrl_client\1_0
directory under your top-level site directory. For example, if your
site root is c:\Inetpub\wwwroot, type this at the command prompt:
xcopy /s /i .\build\Runtime c:\Inetpub\wwwroot\webctrl_client\1_0 /y
This will create the following directory structure under the site:
/webctrl_client/1_0
MultiPage.htc
TabStrip.htc
toolbar.htc
treeview.htc
webservice.htc
webserviced.htc
[images]
[treeimages]
2. Create a new web application in IIS and copy the contents of the
samples directory to this application directory. For example:
xcopy /s /i .\samples c:\Inetpub\wwwroot\sampleapp /y
3. Create a /bin subdirectory for the application and copy the file
Microsoft.Web.UI.WebControls.dll to this directory.
The contents of the application will be as follows:
/sampleapp
multipage.aspx
state_city.xml
tabstrip.aspx
toolbar.aspx
treeview.aspx
treeview_bound.aspx
/bin
Microsoft.Web.UI.WebControls.dll
4. Request the sample pages from your Internet Explorer web browser, for
example: http://localhost/sampleapp/multipage.aspx
浙公网安备 33010602011771号