コード例 #1
0
        protected void btnComment_Click(object sender, EventArgs e)
        {
            try
            {
                string comments = txtComment.Text;
                int    adviceId = int.Parse(Session["itemId"].ToString());
                int    userId   = int.Parse(Session["userId"].ToString());

                BusinessLayer busObj = new BusinessLayer();
                busObj.AddComment(adviceId, comments, userId, connectionString);

                ClearData();
                //Response.Redirect("Home.aspx");
            }
            catch
            {
                //Response.Redirect("ErrorPage.aspx");
            }
        }