在公司不能上博客园,限制太多,基本上你能想到的博客是不能上了。邮箱也只能上内网的。纠结!

image

 

DateTime now = DateTime.Now;
                        newName = now.ToString("yyyyMMddHHmmss") + uploadFiles.PostedFile.ContentLength.ToString();
                        //上传路径 指当前上传页面的同一级的目录下面的wordTmp路径 
                        string path = System.Web.HttpContext.Current.Server.MapPath("wordTmp/");
                        if (!System.IO.Directory.Exists(path))
                        {
                            System.IO.Directory.CreateDirectory(path);
                        }
                        string aimPath = path + newName + extendName;
                        uploadFiles.PostedFile.SaveAs(aimPath);

Posted on 2011-09-03 21:39  日中天  阅读(166)  评论(0编辑  收藏  举报