title: Undefined Error in parsing JSON in ajax function in .NET MVC
body: <p><strong>Jquery</strong> </p>
  
  <pre><code>$('#PostComment').click(function () {
  
               var commentTitle = $('#commentTitle').val();
               var commentClob = $('#commentClob').val();
               var id = $('#topicId').val();
               var buttoname = $('#PostComment').val();
               var obj;
               $.ajax({
  
                   type: "post",
                   url: "../../Handler/Topic.ashx",
  
                   data: "commentclob=" + commentClob + "&amp;commenttitle=" + 
                          commentTitle + "&amp;topicId=" + id + "&amp;Button=" + buttoname,
                   success: function (msg) {
  
                       try {
                            alert(msg);
                           obj = jQuery.parseJSON(msg);
                           alert("Correct" + obj.CommentClob);
  
                       }
                       catch (e) {
  
  
                           alert("Incorrect" + e.Description + e.ErrorNumber);
                       }
  
  
  
                   }
               });
  
               return false;
           });
       });
  </code></pre>
  
  <p><strong>Topic.ashx -ProcessRequest method</strong></p>
  
  <pre><code>     CommentModel cm = daoobject.populateCommentModel(listcommentsbytopic);
       var json= cm.CreateCommentJson();
       context.Response.Write(json);
  </code></pre>
  
  <p><strong>Function definition</strong></p>
  
  <pre><code>     public string CreateCommentJson()
           {
              // serialize the names to JSON
              var jss = new JavaScriptSerializer();
  
              var json = jss.Serialize(this);
              return json;
          }
  </code></pre>
  
  <p>I am getting output 2 alert boxes</p>
  
  <p><strong>first is</strong></p>
  
  <pre><code> { "UserId": "1", "ToipicId": "44f94c32-c415-4751-812a-03b775775698", "CommentId": "0f1014a0-08d9-48f7-9a0c-d9d6b3d841b2", "CommentClob": "ilikeit", "CommentTitle": "nice", "DescriptionClob": null, "DateCreated": "/Date(1333233498780)/", "Datemodified": "/Date(-62135596800000)/" }
  </code></pre>
  
  <p>and <strong>second is</strong></p>
  
  <pre><code>Incorrect undefined undefined
  </code></pre>
  
  <p>Can anyone help.</p>