ASP.NET fileupdate上传控件
if((FileUpload1.PostedFile.ContentLength>0)){Randomran=newRandom();stringFileName=Fil...
if ((FileUpload1.PostedFile.ContentLength > 0)) { Random ran = new Random(); string FileName = FileUpload1.PostedFile.FileName.Substring(FileUpload1.PostedFile.FileName.LastIndexOf("\\")); FileName = ran.Next(10000) + "_" + FileName; if (System.IO.File.Exists(Server.MapPath(Request.ApplicationPath) + "\\UpFiles\\images" + FileName) == false) { try { FileUpload1.PostedFile.SaveAs(Server.MapPath(Request.ApplicationPath) +"\\UpFiles\\images" + FileName); 提示路劲错误~~怎么回事呢~~
展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询