string FileName=DateTime.Now.Date.ToString("yyyyMMddHHmmss")+".html";
string FilePath=Server.MapPath(@"\jingtai\Didi\");
string FileCreatPath=FilePath+FileName;

Create_html(FileCreatPath,dhtml);
private void Create_html(string allfilename,string htmlcode)
{
FileStream CreateFile =new FileStream(allfilename,FileMode.CreateNew);
StreamWriter sw = new StreamWriter(CreateFile);
sw.WriteLine(htmlcode);//将拼好的Html代码写入页面中
sw.Close();
Page.RegisterStartupScript("","<script>window.alert('The file created successfully.!')</script>");
}
显示的错误为
“/tzlinfo”应用程序中的服务器错误。
--------------------------------------------------------------------------------未找到路径“G:\tzlinfo\jingtai\Didi\20060919000000.html”的一部分。 
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.IO.DirectoryNotFoundException: 未找到路径“G:\tzlinfo\jingtai\Didi\20060919000000.html”的一部分。源错误: 
行 99:  private void Create_html(string allfilename,string htmlcode)
行 100: {
行 101: FileStream CreateFile =new FileStream ---------此处红色显示(allfilename,FileMode.CreateNew);
行 102: StreamWriter sw = new StreamWriter(CreateFile);
行 103: sw.WriteLine(htmlcode);//将拼好的Html代码写入页面中操作系统 window xp