上传文件

    技术2022-05-11  58

    if (m_filePath.PostedFile != null)         {             string nam = m_filePath.PostedFile.FileName;             int i = nam.LastIndexOf(".");             string newext = nam.Substring(i);             DateTime now = DateTime.Now;             string newname = now.DayOfYear.ToString() + m_filePath.PostedFile.ContentLength.ToString();             m_filePath.PostedFile.SaveAs(Server.MapPath("Up" + "/upload" + newname + newext));         } 

    最新回复(0)