/// <summary> /// Raises the <see cref="Wilco.Web.UI.WebControls.MultiFileUpload.FilesPosted"/> event. /// </summary> /// <param name="e"></param> protected virtual void OnFilesPosted(FilesPostedEventArgs e) { FilesPostedEventHandler handler = this.Events[MultiFileUpload.EventFilesPosted] as FilesPostedEventHandler; if (handler != null) { handler(this, e); } }
public void inputImages_FilesPosted(object sender, DBlog.Tools.WebControls.FilesPostedEventArgs e) { if (PostId > 0) { foreach (HttpPostedFile file in e.PostedFiles) { TransitImage image = new TransitImage(); image.Data = new BinaryReader(file.InputStream).ReadBytes(file.ContentLength); image.Name = Path.GetFileName(file.FileName); SessionManager.BlogService.CreateOrUpdatePostImage(SessionManager.Ticket, PostId, image); } if (e.PostedFiles.Count > 0) { SessionManager.Invalidate <TransitPostImage>(); SessionManager.Invalidate <TransitPost>(); images.Visible = true; GetDataImages(sender, e); } } }