111,120
社区成员
发帖
与我相关
我的任务
分享
string uploadName1 = PicUpload.Value.Trim();
string pictureName1 = "";
if (uploadName1 != "")
{
int idx = uploadName1.LastIndexOf(".");
string suffix1 = uploadName1.Substring(idx);//文件后缀
pictureName1 = System.DateTime.Now.Ticks.ToString() + suffix1;
ht.Add("UserPic1", SqlStringConstructor.GetQuotedString(pictureName1));
string path1 = Server.MapPath("..\\Upfiles\\");
PicUpload.PostedFile.SaveAs(path1 + pictureName1);
}
string uploadName2 = PicUpload2.Value.Trim();
string pictureName2 = "";
if (uploadName2 != "")
{
int idx2 = uploadName2.LastIndexOf(".");
string suffix2 = uploadName2.Substring(idx2);//文件后缀
pictureName2 = System.DateTime.Now.Ticks.ToString() + suffix2;
ht.Add("UserPic2", SqlStringConstructor.GetQuotedString(pictureName2));
string path2 = Server.MapPath("..\\Upfiles\\");
PicUpload.PostedFile.SaveAs(path2 + pictureName2);
}