title: Success Message in Ajax Jquery
body: <p>I am developing an app in asp.net in which I have jquery code in my asp page</p>
  
  <pre><code>var strdata = {
             problemID: $("#problemID").val(),
             commentText: $("#_1").val(),
             empID: $("#empID").val(),
             agree: 0,
             disagree: 0
          };
          $.ajax({
              type: "POST",
              url: "&lt;%= Url.Action("PostComment", "Discussion")  %&gt;",
              data: strdata,
              dataType: "JSON",
              success: function (msg) {
                  if ( msg == 1)
                  alert("Success" + msg );
              }
          });
  </code></pre>
  
  <p>and my controller has code</p>
  
  <pre><code>  public bool PostComment(string problemID, string commentText, string empID, string agree, string disagree)
          {
  
  
              return _discussionRepository.postComment(Convert.ToInt32(problemID), commentText, Convert.ToInt32(empID), Convert.ToInt32(agree),Convert.ToInt32( disagree));
          }
  </code></pre>
  
  <p>and model has code</p>
  
  <pre><code>public bool postComment(int problemID, string commentText, int empID, int agree, int disagree)
          {
              bool result = false;
              Comment c = new Comment();
              c.ProblemID = problemID;
              c.CommentText = commentText;
              c.EmpID = empID;
              c.Agree = agree;
              c.DisAgree = disagree;
  
              _objectModel.Comments.InsertOnSubmit(c);
              try
              {
                  _objectModel.SubmitChanges();
                  result = true;
  
              }
  
              catch (Exception ex)
              {
              }
  
  
              return result;  
  
  }
  </code></pre>
  
  <p>Data is saving in database through ajax and jquery but the success message is not showing</p>