treeview和webctrl_client目录问题

wnix 2006-09-09 09:21:34
我把webctrl_client放到C:\Inetpub\wwwroot\(IIS的根目录)目录下,treeview可以正常使用

我把C:\Inetpub\wwwroot\webctrl_client删除,把webctrl_client放到我的虚拟根目录下,treeview就只显示静态的文字。 大家知道什么原因吗。

因为我们使用的是别人的虚拟主机,只能通过把webctrl_client放到虚拟根目录下解决。

...全文
733 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
xutao79jack 2006-09-20
  • 打赏
  • 举报
回复
up
jijl2001 2006-09-09
  • 打赏
  • 举报
回复
楼上的正解
jxufewbt 2006-09-09
  • 打赏
  • 举报
回复
可以把webctrl_client放在自己应用文件目录里,但是需要在WebConfig中设置
在<configuration>下添加:

<configSections>

<section name="MicrosoftWebControls" type="System.Configuration.NameValueSectionHandler, System, System.Configuration.NameValueSectionHandler, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

</configSections>

<MicrosoftWebControls>

<add key="CommonFiles" value="/website/webctrl_client/1_0" />

</MicrosoftWebControls>

shortstar 2006-09-09
  • 打赏
  • 举报
回复
把BaseRichControl.cs第52行处加"../"

然后用build.bat重新build一下,然后把Build出来的那个东西再引用到工程目录里试试

呵呵,我能找到的就这几种方法,你试试吧
shortstar 2006-09-09
  • 打赏
  • 举报
回复
方法一:WebConfig中设置,在<configuration>下添加:

<configSections>
<section name="MicrosoftWebControls" type="System.Configuration.NameValueSectionHandler, System, System.Configuration.NameValueSectionHandler, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

</configSections>

<MicrosoftWebControls>

<add key="CommonFiles" value="/website/webctrl_client/1_0" />

</MicrosoftWebControls>

注:我这里的Website指的是你的工程目录名

方法二:直接设置TreeView控件的SystemImagesPath属性,如:

SystemImagesPath="webctrl_client/1_0/treeimages/"

表示webctrl_client放在和TreeView控件所在的文件的同级目录下
chenxiaoguo20 2006-09-09
  • 打赏
  • 举报
回复
关注
wnix 2006-09-09
  • 打赏
  • 举报
回复
谢谢个位, 我改成其他的方式做了。
散分。
never_give_up520 2006-09-09
  • 打赏
  • 举报
回复
下载并安装完 IE Web 控件后,将创建一个新目录(默认为 C:\Program Files\IE Web Controls\,您也可以在安装过程中配置此目录)。找到这个新目录,然后双击 build.bat 文件。这将创建一个新的子目录 build,编译 src 子目录中的类,并将生成的程序集和支持文件复制到 build 子目录中。

  运行完 build.bat 文件后,build 子目录将包含程序集文件 Microsoft.Web.UI.WebControls.dll 和子目录 Runtime。要在 ASP.NET Web 应用程序中使用 IE Web 控件,必须将 build\Runtime 子目录中的内容复制到 Web 应用程序的 /webctrl_client/1_0 子目录中,并将程序集文件 (Microsoft.Web.UI.WebControls.dll) 复制到 Web 应用程序的 /bin 子目录中。(在 IE Web 控件的 README.txt 文件中,提供了示例以及执行这些任务的命令行指令。)
我昨天才试过的,可以运行,好用。

wnix 2006-09-09
  • 打赏
  • 举报
回复
是否和framework的版本有关,服务器是2.0版本 。
wnix 2006-09-09
  • 打赏
  • 举报
回复
Server Error in '/' Application.
--------------------------------------------------------------------------------

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load file or assembly 'Microsoft.Web.UI.WebControls, Version=1.0.2.116, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Source Error:
Line 1: <%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls" %>
Line 2: <%@ Page language="c#" Codebehind="tree.aspx.cs" AutoEventWireup="false" Inherits="ceo.admin.tree" %>
Line 3: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
Source File: /an/tree.aspx Line: 1

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.Web.UI.WebControls, Version=1.0.2.116, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.


WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. --------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
wnix 2006-09-09
  • 打赏
  • 举报
回复
很奇怪, 我按照以下办法,在我的机器上,已经可以了,其中webctrl_client放到使用这个控件的目录。
但我上传到服务器上还是不可以。 错误代码见下贴。

<configSections>
<section name="MicrosoftWebControls" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>
<MicrosoftWebControls>
<add key="CommonFiles" value="webctrl_client/1_0"></add>
</MicrosoftWebControls>
解决ASP.NET的TREEVIEW控件不能显示树型结构 当我们使用ASP.NET的TREEVIEW控件时候,我们发现ASP.NET的TREEVIEW控件不能显示树型而是显示为顺序排列的文字。我们该怎么解决呢 (1)安装IEWebControls.(下载地址httpasp.netIEWebControlsDownload.aspxtabid=1) (2)运行Build.bat.注意,我们先用记事本打开Build.bat,在里面我们看到csc.exe,它的前面没有路径,所以我们运行它的时候会产生一个build目录及其相应文件,却在build目录下无法找到Microsoft.Web.UI.WebControls.dll.解决方法打开C盘(假设操作系统安装在该盘下),搜索csc.exe,我们会发现搜索到两个文件,选择第一个文件(名称为csc)的属性,复制其位置CWINDOWSMicrosoft.NETFrameworkv1.1.4322,然后将它粘贴到Build.bat中csc.exe前面即可(CWINDOWSMicrosoft.NETFrameworkv1.1.4322csc.exe),再运行Build.bat. (3) 1.如果IIS的根目录默认的路径(cinetpubwwwroot)没有改变,则只需要将运行Build.bat后生成的build目录下的Runtime目录下的文件和文件夹一起复制到CInetpubwwwrootwebctrl_client1_0下就可以了,webctrl_client1_0这两级目录需要你自己创建.(文件夹名称别弄错了哦!:)) 2.如果IIS的根目录已经由默认的路径(cinetpubwwwroot)改变为其他路径(假设为Dexample),我们需要重新在IIS上注册asp.net,具体步骤Windows “开始”菜单-“程序”-“Visual Studio .NET 2003”-“Visual Studio .NET 工具”-“Visual Studio .NET 命令提示”,然后在该窗口输入打开后,输入 aspnet_regiis i 回车即可。成功安装后,你会发现Dexample目录下多了一个名为aspnet_client的文件夹,表示你注册成功了!然后需要将运行Build.bat后生成的build目录下的Runtime目录下的文件复制到Dexamplewebctrl_client1_0下就可以了,webctrl_client1_0 这两级目录需要你自己创建. (4)把生成的Microsoft.Web.UI.WebControls.dll 放到你的工程项目中文件夹的名称为 bin 的目录下。 这样ASP.NET的TREEVIEW控件就能够正确显示树型结构了! 友情提示:你成功安装 IEWebControls 后(默认C盘哈),你在CProgram FilesIE Web Controls下有个README.txt的文本文件,上面非常详细的讲解了如何正确使用 IEWebControls 的方法,并给出了样例。:) 以上解决方法适用于Visual Studio .NET 2003.

62,074

社区成员

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

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

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

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