protected void btnSave_OnClick(object sender, EventArgs e) { if (Session["customerVo"] != null) { customerVo = (CustomerVo)Session["customerVo"]; } StringBuilder strRMRecommendationText = new StringBuilder(); strRMRecommendationText.Append("<html><head><title></title></head><body><table>"); string strTR = "<tr><td><p align=\"justify\"> </p></td></tr>"; string strParaText = string.Empty; if (!string.IsNullOrEmpty(txtParagraph1.Text.Trim())) { strRMRecommendationText.Append(strTR.Replace(" ", txtParagraph1.Text)); strRMRecommendationText.Append(strTR); } if (!string.IsNullOrEmpty(txtParagraph2.Text.Trim())) { strRMRecommendationText.Append(strTR.Replace(" ", txtParagraph2.Text)); strRMRecommendationText.Append(strTR); } if (!string.IsNullOrEmpty(txtParagraph3.Text.Trim())) { strRMRecommendationText.Append(strTR.Replace(" ", txtParagraph3.Text)); strRMRecommendationText.Append(strTR); } if (!string.IsNullOrEmpty(txtParagraph4.Text.Trim())) { strRMRecommendationText.Append(strTR.Replace(" ", txtParagraph4.Text)); strRMRecommendationText.Append(strTR); } if (!string.IsNullOrEmpty(txtParagraph5.Text.Trim())) { strRMRecommendationText.Append(strTR.Replace(" ", txtParagraph5.Text)); strRMRecommendationText.Append(strTR); } strRMRecommendationText.Append("</table></body></html>"); customerBo.AddRMRecommendationForCustomer(customerVo.CustomerId, Convert.ToString(strRMRecommendationText)); getCustomerRMRecommendationText(); setRecommendationControlReadOnly(true); }