title: Receive JSON data from MVC Controller via XMLHTTPRequest
body: <p>I want to get the JSON data from MVC Controller. </p>
  
  <p>NOTE: I am calling Controller through <code>XMLHTTPRequest.Send(data)</code>.</p>
  
  <p>The Controller is returning the JSON data, but I don't know how to get that data if we are using XMLHTTPRequest.</p>
  
  <p>I am not using Ajax calls due to some reasons. But is it possible to get it through an XMLHttpRequest or response? If so, kindly help me..</p>
  
  <p>Example for the controller is below. From this, I want to get the FileName and FilePath.</p>
  
  <pre><code>    public JsonResult SaveAttachments()
      {
          try
          {
  
              .......
                  }
              }
              return new Program1.WebClient.App_Start.BaseController.WrappedJsonResult
              {
                  Data = new
                  {
                      isSuccess = true,
                      CusEvent = "close",
                      CusMsg = "Attachment file upload successful",
                      FileName = fileName,
                      FilePath = filePath
                  }
              };
          }
          catch (Exception ex)
          {
              throw new Exception("File upload failed. ");
          }
  
      }
  </code></pre>