title: Passing JSON object to MVC Controller
body: <p>I can successfully make a jQuery Ajax call into my C# Controller and receive back an XML string, but I need to in turn gather some Portfolio dates and package them up into a JSON object so I can send them back into another C# Controller.
  If it's a C# issue, then I apologize if I'm in the wrong forum...however I'd like to pass my JSON object into the server side controller ..</p>
  
  <p>Here's what I'm trying to do:</p>
  
  <pre><code>        var nodeDatesJson = {"nodedates":        // CREATE JSON OBJECT OF DATE STRINGS
                              { "date": 01/20/2012,
                                "date": "01/21/2012" } };
          getTradeContribs(thisPfId, nodeDatesJson.nodedates.date);     
  </code></pre>
  
  <p>Now call the next js function:</p>
  
  <pre><code> function getTradeContribs(pfid, nodedates) {
          //alert(nodedates);
          $.ajax({                                // GET TRADE CONTRIBS FROM SERVER !!
              url: "/Portfolios/getTradeContribs?portfolioId=" + pfid + "&amp;nodedates=" + nodedates,
              type: "GET",    // or "PUT"
              dataType: "json",               
              async: true,
              success: parseTradeContribs,
              error: function (error) {
                  alert("failed in opening Trade Contribs file !!!");
              }
          });
      }
      function parseTradeContribs(data) {
          alert("In parseTradeContribs..." );
          $(data).find("Trade").each(function(){
              $(".TradeContrib").append($(this).text());
          })
      }
  </code></pre>
  
  <p>and my C# controller is trying to <strong>read in the "nodedates" JSON object</strong>, but <strong>HOW</strong> do I read it in ?</p>
  
  <pre><code>   public string getTradeContribs(string portfolioId, **string nodedates**)
          {
  
              // Build Portfolio Select request here !
              RequestBuilder rzrRequest = new RequestBuilder();
  
              // REQUEST FOR CONTRIBUTIONS !
              // ... more code here..
              xmlResponse.LoadXml(contribResponse);
  
              string jsonTest = @" {""nodedates"": ""date"":""01/01/2012""}";
  
              //return xmlResponse.OuterXml;  // WORKS FINE
              return "&lt;Trade&gt;&lt;TradeId&gt;1234&lt;/TradeId&gt;&lt;/Trade&gt;";    // RETURN TEST XML STR
  
          }
  </code></pre>
  
  <p>thank you in advance...
  Bob</p>