DateTime nowdt=DateTime.Now;
if (BugFile.PostedFile.ContentLength>0)
{
string strSaveDir = "./uploadFile/";
string strName=BugFile.PostedFile.FileName;
int intExt = strName.LastIndexOf(".");//取得文件扩展名
string strExt = strName.Substring(intExt);
string strNewName;
DateTime datNow = DateTime.Now;
strNewName = datNow.DayOfYear.ToString()+datNow.Second.ToString() + BugFile.PostedFile.ContentLength.ToString() + strExt;
BugFile.PostedFile.SaveAs(Server.MapPath(strSaveDir + strNewName));
}
if (BugFile.PostedFile.ContentLength>0)
{
string strSaveDir = "./uploadFile/";
string strName=BugFile.PostedFile.FileName;
int intExt = strName.LastIndexOf(".");//取得文件扩展名
string strExt = strName.Substring(intExt);
string strNewName;
DateTime datNow = DateTime.Now;
strNewName = datNow.DayOfYear.ToString()+datNow.Second.ToString() + BugFile.PostedFile.ContentLength.ToString() + strExt;
BugFile.PostedFile.SaveAs(Server.MapPath(strSaveDir + strNewName));
}