在WEB中树形结构构 为什么是一行文字

zhangjianhong 2005-09-26 04:21:15
我下载了Microsoft.Web.UI.WebControls;想用一下树形控件
在页面文件(tree.aspx)也注册了
<%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls" %>

下面是设计在显示的HTML文件
<form id="Form1" method="post" runat="server">
<FONT face="宋体">
<iewc:TreeView id="TreeView1" style="Z-INDEX: 101; LEFT: 56px; POSITION: absolute; TOP: 48px" runat="server"
Width="104px" Height="176px">
<iewc:TreeNode Checked="True" Text="中国" Expanded="True">
<iewc:TreeNode Checked="True" Text="北京" Expanded="True"></iewc:TreeNode>
<iewc:TreeNode Checked="True" Text="广东" Expanded="True"></iewc:TreeNode>
<iewc:TreeNode Checked="True" Text="广西" Expanded="True"></iewc:TreeNode>
<iewc:TreeNode Checked="True" Text="湖南" Expanded="True"></iewc:TreeNode>
<iewc:TreeNode Checked="True" Text="湖北" Expanded="True"></iewc:TreeNode>
</iewc:TreeNode>
</iewc:TreeView></FONT>
</form>

在运行之后 IE中却没有树形的效果 是一排文字
请问各位高手是什么原因?
...全文
117 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
swordragon 2005-09-26
  • 打赏
  • 举报
回复
操作步骤:
1 运行IEwebcontrol.exe,比如安装在 C:\Program Files\IE Web Controls
2 执行 C:\Program Files\IE Web Controls 下 build.bat
3 运行/cmd , cd C:\Program Files\IE Web Controls
4 xcopy /s /i .\samples c:\Inetpub\wwwroot\sampleapp /y
5 xcopy /s /i .\build\Runtime c:\Inetpub\wwwroot\webctrl_client\1_0 /y
OK搞定
zhangjianhong 2005-09-26
  • 打赏
  • 举报
回复
谢谢洞庭湖 大侠 小弟已经解决
swordragon 2005-09-26
  • 打赏
  • 举报
回复
确认Inetpub\wwwroot\是否存在目录:
webctrl_client\1_0
MultiPage.htc
TabStrip.htc
toolbar.htc
treeview.htc
webservice.htc
webserviced.htc
[images]
[treeimages]

如果不存在这个目录,那么显示的就是流文本。

在安装完Internet Explorer Web Controls以后,必须执行以下操作:

=====================================
Internet Explorer Web Controls README
=====================================
Last updated: 1/14/2002

Thank you for downloading the IE Web Controls source code release! The Src
folder contains the source code for the IE MultiPage, ToolBar, TreeView, and
TabStrip controls, along with related base classes and design-time support.

To build the IE Web Controls:

1. Make sure you have installed the .NET Framework SDK v1.0 or v1.1
2. Run Build.bat, which will create a build folder in this directory.
The build folder contains Microsoft.Web.UI.WebControls.dll and a
Runtime directory of supporting files.

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

For additional documentation and samples visit:
http://msdn.microsoft.com/library/default.asp?url=/workshop/webcontrols/webcontrols_entry.asp
孟子E章 2005-09-26
  • 打赏
  • 举报
回复
http://www.microsoft.com/china/MSDN/library/archives/library/DNAspp/html/aspnet-usingtreeviewieWebcontrol.asp
zhangjianhong 2005-09-26
  • 打赏
  • 举报
回复
http://www.microsoft.com/china/MSDN/library/archives/library/DNAspp/html/aspnet-usingtreeviewieWebcontrol.asp
我是按照这个网上说的装的
没有问 DLL可以引用
代码中可以用
TreeNode a=new TreeNode();
a.Text="资源管理器";
TreeNode b=new TreeNode();
b.Text="目录";
a.Nodes.Add(b);

this.TreeView1.Nodes.Add(new Microsoft.Web.UI.WebControls.TreeNode("aaaaaaaa"));
this.TreeView1.Nodes.Add(a);
this.TreeView1.ExpandLevel=1;
pclogic 2005-09-26
  • 打赏
  • 举报
回复
看控件安装说明
liuxin001 2005-09-26
  • 打赏
  • 举报
回复
安装的时候没有按照步骤操作吧,我以前遇到过这种情况。重新再尝试下。
孟子E章 2005-09-26
  • 打赏
  • 举报
回复
htc路径错误,或者文件格式(编码)错误
okyzx 2005-09-26
  • 打赏
  • 举报
回复
或者你是的工程目录bin下缺少Microsoft.Web.UI.WebControls.dll
qiuji 2005-09-26
  • 打赏
  • 举报
回复
在你的当前项目所在站点的根目录(是当前站点的根目录,不一定是wwwroot目录),将文件夹webctrl_client复制到那个目录下即可。
okyzx 2005-09-26
  • 打赏
  • 举报
回复
你的树型控件安装有问题,重装一下吧
shalen520 2005-09-26
  • 打赏
  • 举报
回复
你木有安装树型控件

62,047

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧