protected void insertComment(object sender, EventArgs e) { try { if (ctxtContent.Content != string.Empty && txtcname.Text != string.Empty) { getPostId(); bmo.AddComment(ctxtContent.Content, post_id, User.Identity.Name, DateTime.Now); lblcommentList.Text = bmo.getComments(post_id); } else { throw new Exception("You must display fill in textboxes"); } } catch (Exception ex) { lblServerMessage.Font.Size = FontUnit.Larger; lblServerMessage.Text = ex.Message; lblServerMessage.BackColor = System.Drawing.Color.LightYellow; lblServerMessage.ForeColor = System.Drawing.Color.IndianRed; ctxtContent.Focus(); } }