紧急求救.如何在自定义控件的设计期间.获得当前引用工程的路径.
public class CompositeControlDesigner : ControlDesigner {
public override string GetDesignTimeHtml() {
// Retrieve the controls to ensure they are created.
ControlCollection controls = ((Control)Component).Controls;
spellDelegate sp = new spellDelegate();
//sp.copyFile(@"c:\atlog.txt",@"d:\atlog.txt");
//sp.copyFile(@"c:\atlog.txt",System.Web.HttpContext.Current.Server.MapPath("."));
return base.GetDesignTimeHtml();
}
System.Web.HttpContext.Current.Server.MapPath(".")//在这不能使用.
Directory.GetCurrentDirectory();System.Environment.CurrentDirectory得到的都是system32目录
public class CompositeControlDesigner : ControlDesigner {
public override string GetDesignTimeHtml() {
// Retrieve the controls to ensure they are created.
ControlCollection controls = ((Control)Component).Controls;
spellDelegate sp = new spellDelegate();
//sp.copyFile(@"c:\atlog.txt",@"d:\atlog.txt");
//sp.copyFile(@"c:\atlog.txt",System.Web.HttpContext.Current.Server.MapPath("."));
return base.GetDesignTimeHtml();
}
System.Web.HttpContext.Current.Server.MapPath(".")//在这不能使用.
Directory.GetCurrentDirectory();System.Environment.CurrentDirectory得到的都是system32目录
解决方案 »
- 如何在服务器控件的触发事件中执行js脚本函数
- Highlighter.Net.dll高亮显示问题
- 请教高手,我把TextBox里的文本内容(包括换行部分)保存在数据库里.我现在把保存在数据库里的这个字段内容重新放到TextBox里,结果TextBox里
- 如何把通过treeView打开的页面都关闭?
- 【【如何写心得体会?急~~~~】】
- 求救!在线等待
- Import Namespace="System.Data.ADO"出错?
- 请教 aspnetpager控件的具体使用
- 虽然没有分,但很着急解决的一个关于arraylist的问题!
- OnItemDataBound与DataBind()的先后顺序。
- 不需要在iis中添加扩展名htm映射,2.htm映射到read.aspx?ID=2上,可以吗?
- 刚在window server2003上装了iis组件,在WEB页上运行http://127.0.0.1但不能打开,为什么?
D:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\