Esempio n. 1
0
        protected void btnAddComment_Click(object sender, System.EventArgs e)
        {
            Photo photo = (Photo)Session["photo_CurrentPhoto"];

            Comment comment = new Comment(HttpUtility.HtmlDecode(txtCommentName.Text),
                                          HttpUtility.HtmlDecode(txtCommentText.Text));

            photo.AddComment(comment);

            DisplayComments(photo);

            txtCommentName.Text = "";
            txtCommentText.Text = "";
        }