private void HandleSave(HttpContext context)
        {
            HttpFileCollection          fs    = context.Request.Files;
            Dictionary <string, byte[]> files = new Dictionary <string, byte[]>();
            var id      = context.Request.Form["id"];
            var email   = context.Request.Form["email"];
            var comment = context.Request.Form["comment"];

            //foreach (string file in fs)
            //{
            //    HttpPostedFile mainf = fs.Get(file);
            //    files.Add(file, mainf.ToByteArray());
            //}

            for (int i = 0; i < fs.Count; i++)
            {
                HttpPostedFile mainf = fs.Get(i);
                files.Add(mainf.FileName, mainf.ToByteArray());
            }


            bool result = presenter.SaveComment(id, email, comment, files);

            if (result)
            {
                context.Response.Write("success");
            }
            else
            {
                context.Response.Write("failed");
            }
        }
        protected void PostCommentButton_Click(object sender, EventArgs e)
        {
            //var editorvalue = this.EditorValueHiddenField.Value;
            string validationMsg = string.Empty;

            if (!IsFormValid(out validationMsg))
            {
                this.ValidationLiteral.Text = string.Format(
                    "<div class='validation-summary'><ul>{0}</ul></div>", validationMsg);
                return;
            }

            string diagramId = Request["id"];

            //var html = this.Editor.Text;

            presenter.SaveComment(diagramId,
                                  this.EmailTextBox.Text.Trim(),
                                  CleanComment(this.editor_id.Value).Trim(),
                                  GetPostedFiles());
            this.EmailTextBox.Text = string.Empty;
            this.editor_id.Value   = string.Empty;
            //this.FileListBox.Items.Clear();
            this.ValidationLiteral.Text = string.Empty;
            ClearButton_Click(sender, e);
        }