示例#1
0
        protected void UploadButton_Click(object sender, EventArgs e)
        {
            try
            {
#if DEBUG
                System.Threading.Thread.Sleep(3 * 1000);
#endif

                UploadPanel.Visible = false;
                ShowPanel.Visible   = true;

                filename =
                    Server.MapPath("~/App_Data/imgUpload/") +
                    Guid.NewGuid() +
                    Path.GetExtension(ImageUploader.FileName);
                ImageUploader.SaveAs(filename);
                ImageUploader.Dispose();

                Global.PhotoHandler.Detect(filename, PHandler_OnFinished);
            }
            catch (Exception ex)
            {
                Logger.WriteLog(nameof(UploadButton_Click), ex);
            }
        }