c/s的没有,b/s的倒有一些,你自己参考以下;
if(upFile.PostedFile != null && !upFile.PostedFile.FileName.Equals(""))
{
  string fileName = upFile.PostedFile.FileName;
  int i = fileName.LastIndexOf(".");
  string newExt = fileName.Substring(i);//取得文件扩展名
  DateTime now = DateTime.Now;
  string newName = now.DayOfYear.ToString() + upFile.PostedFile.ContentLength.ToString();
  upFile.PostedFile.SaveAs(Server.MapPath("\\upload\\" + newName+newExt));
}