自己up你需要把webctrl_client目录拷贝到IIS的根目录下,这样你引用的微软的webcontrols才能正常工作这句话是绝对的吗?我想把树容到自己的工程文件下。只用一个虚拟目录。。

解决方案 »

  1.   

    或者谁有TreeView控件的源码??不行我自己改一个总可以把。
      

  2.   

    改BaseRichControl.cs文件中找到那个目录名的字符串改一改看看
      

  3.   

    楼上的兄弟,我没有treeview的源代码,请给我一份。谢谢。
      

  4.   

    treeview的基类实现,看以下该有所帮助
          private const string ConfigName             = "MicrosoftWebControls";
            private const string DefaultCommonFilesRoot = "/webctrl_client/";
            private const string CommonFilesKey         = "CommonFiles";
      private static string FindCommonPath(HttpContext context)
            {
                // Look at the current configuration for the path
                if (context != null)
                {
                    NameValueCollection table = (NameValueCollection)context.GetConfig(ConfigName);
                    if (table != null)
                    {
                        string path = (string)table[CommonFilesKey];
                        if (path != null)
                        {
                            return CleanupPath(path);
                        }
                    }
                }            // Return the default path with version number
                Assembly assembly = typeof(BaseRichControl).Assembly;
                Version version = assembly.GetName().Version;            return DefaultCommonFilesRoot + version.Major.ToString() + "_" + version.Minor.ToString() + "/";
            }
    看以上代码,可以在webconfig里加相关的配置既可。
    <MicrosoftWebControls>
    <add key="CommonFiles" value="/您的目录">
    </MicrosoftWebControls>
      

  5.   

    <MicrosoftWebControls>
    行 4:  <add key="CommonFiles" value="WebControls">
    行 5:  </MicrosoftWebControls>配置错误 
    请楼上的看一下。