protected void btnSubmit_Click(object sender, EventArgs e) { string commentUserName = Session["loggedInUsername"].ToString().Trim(); string commentMessage = txtMessage.Text; DateTime commentDateTime = DateTime.Now; int postId = int.Parse(Request.QueryString["id"]); Forum fr = new Forum(postId, commentUserName, commentMessage, commentDateTime.ToString()); frDAO.insertIntoCommentTable2(fr); Response.Redirect("Post.aspx?id=" + postId.ToString()); }