#region SaveDataBasee PhotoInfo m_PInfo = new PhotoInfo(); m_PInfo.Organization = "5173"; m_PInfo.PicName = FileName.InnerHtml; m_PInfo.ServerName = "GLSDB"; m_PInfo.Cdate = DateTime.Now; m_PInfo.Exp = FileExtention.InnerHtml; m_PInfo.Flag = 0; m_PInfo.GameNickName = "Bruce";//TextBox控件内容 m_PInfo.MoonStar = 0; m_PInfo.ShowIndex = 0; m_PInfo.SPicHttpAddr = m_sSavePath; m_PInfo.Type = 0; m_PInfo.Vote = 0; m_PInfo.PicHttpAddr=m_SavePath; PhotoDAO m_PDao = new PhotoDAO(); m_PDao.Insert(m_PInfo); #endregion } else { Response.Write("<script>alert('图片格式不正确,请选择图片文件!');</script>"); } #endregion } #endregion } catch (Exception m_Ex) { Response .Write ("<script>alert('"+m_Ex.ToString ()+"');</script>"); } } else if (FileUpload1.PostedFile.FileName == "") { Response.Write("<script>alert('上传文件不能为空!');</script>"); } } |