怎么设置TreeView的Htc文件路径(目的不想在同级建立WebControls虚拟目录 在线等待~~~~~~~~~~~) 自己up你需要把webctrl_client目录拷贝到IIS的根目录下,这样你引用的微软的webcontrols才能正常工作这句话是绝对的吗?我想把树容到自己的工程文件下。只用一个虚拟目录。。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 或者谁有TreeView控件的源码??不行我自己改一个总可以把。 改BaseRichControl.cs文件中找到那个目录名的字符串改一改看看 楼上的兄弟,我没有treeview的源代码,请给我一份。谢谢。 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> <MicrosoftWebControls>行 4: <add key="CommonFiles" value="WebControls">行 5: </MicrosoftWebControls>配置错误 请楼上的看一下。 droplist的问题 小弟急求一个关于dropdownlist联动的问题 100分急求“设计时支持”的概念 页面布局的问题! C#如何格式化时间格式?2006年12月14日->2006-12-14 findcontrol能否设置控件属性 一段下载文件的代码,为何中文文件名字显示乱码。 关于.aspx和.cs文件中逻辑代码的区别? 高难的技术问题, 如何实现下载功能? 文件上传的一个问题(100分) 问一个比较弱的问题!
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>
行 4: <add key="CommonFiles" value="WebControls">
行 5: </MicrosoftWebControls>配置错误
请楼上的看一下。