代码部分
string fileTime = DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString() + DateTime.Now.Day.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString();//以时间为图片命名 string fileExtName = UploadFileName.Substring(UploadFileName.LastIndexOf("."));
string filename = UploadFileName.Substring(UploadFileName.LastIndexOf("\\") + 1);
UploadFileDestination = HttpContext.Current.Request.PhysicalApplicationPath;
UploadFileDestination +=“\\UploadFiles\\”; //文件路径
bmp.Save(UploadFileDestination + fileTime + fileExtName);
lblchan.Text = fileTime + fileExtName;
图片可以保存。但是给 lblchan.Text 赋值这一步,没有赋值成功。怎么才可以给lblchan.Text获取到值。
lblchan.Text = fileTime + fileExtName;这句放前边点,图片看不见
这个早就试过了。不行。