protected void btnSubmit_Click(object sender, EventArgs e)
        {
            Message m = new Message(txtMessage.Text, topicId, userId);

            // Reply boolean is used to check if the user is creating a new thread,
            // or if the user is replying to a thread that already exists.
            if (reply)
            {
                PostReply(m);
            }

            if (edit)
            {
                EditMessage(m);
            }

            else if (!reply && !edit)
            {
                PostNewMessage();
            }
        }
 private void EditMessage(Message m)
 {
     // TODO: Edit the currently selected message
     throw new NotImplementedException();
 }
        private void PostReply(Message m)
        {
            int? messageId = m.Post();

            // If messageId isn't null, then a message was created. Redirect the user to the
            // thread that the message is posted in
            if (messageId != null)
            {
                Response.Redirect("ThreadIndex.aspx?threadId=" + topicId);
            }

            else
            {
                Response.Redirect("ErrorPage.aspx");
            }
        }