protected void btnPost_Click(object sender, EventArgs e) { try { if (SessionBag.Profile.ID.Equals(_ObjProfile.ID)) { throw new Exception("You can not post review to yourself!"); } else { tblReview review = new tblReview() { IsApproved = false, CreatedDate = DateTime.Now, IPAddress = SessionBag.UserBrowsingInfo.IP, ProfileID = _ObjProfile.ID, ReviewerProfileID = SessionBag.Profile.ID, Review = rtbComment.Text, Score = Decimal.Parse(rrProfileRating.Value.ToString()), }; GoProGoDC.ProfileDC.tblReviews.InsertOnSubmit(review); GoProGoDC.ProfileDC.SubmitChanges(); Server.Transfer(string.Format("~/PersonSupply.aspx?ProfileID={0}", _ObjProfile.ID.ToString())); } } catch (Exception ex) { if (OnError != null) { OnError(this, new ControlErrorArgs() { InnerException = ex }); } } }