ASP C# 未能映射路径
if((uploadfile.PostedFile!=null)&&(uploadfile.PostedFile.FileName.Trim()!="")){string...
if((uploadfile.PostedFile!=null)&&(uploadfile.PostedFile.FileName.Trim()!=""))
{
string nam = uploadfile.PostedFile.FileName ;
int i= nam.LastIndexOf(".");
newext2 =nam.Substring(i);
DateTime now = DateTime.Now;
newname2 =now.DayOfYear.ToString()+ uploadfile.PostedFile.ContentLength.ToString();
uploadfile.PostedFile.SaveAs(Server.MapPath("\\hr\\img\\"+newname2+newext2));
} 展开
{
string nam = uploadfile.PostedFile.FileName ;
int i= nam.LastIndexOf(".");
newext2 =nam.Substring(i);
DateTime now = DateTime.Now;
newname2 =now.DayOfYear.ToString()+ uploadfile.PostedFile.ContentLength.ToString();
uploadfile.PostedFile.SaveAs(Server.MapPath("\\hr\\img\\"+newname2+newext2));
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询