title: How do I get a single json value using Webmatrix / razor?
body: <p>I am trying to grab just a single value from some json and am using Chrome's javascript console to try and debug it. I have tried Request["id"], and Request.Params["id"] and it doesn't grab anything. I have verified via the chrome javascript debugger that the value is going across but I can't pull the value out using webmatrix. Can anybody please help?</p>
  
  <p>code from Default.cshtml</p>
  
  <pre><code>$.ajax({
      type: 'POST',
      data: encodedItemId, //looks like { id : value }
      dataType: 'json',
      url: '/actions/act_markCompleted.cshtml',
      success: function(data){
          alert(data); //trying to view the json data
      }
  });
  </code></pre>
  
  <p>Posts via ajax to this page, act_markCompleted.cshtml</p>
  
  <pre><code> @{
     var itemId = Request["id"];
  
     var data = "The id is: " + itemId;
  
     var db = Database.Open("VacationBuddyDB");
     var sql = "UPDATE Items SET completed = @0 WHERE Id = @1";
  
     db.Execute(sql, true, itemId.AsInt());
  
     Json.Write(data, Response.Output);
   }
  </code></pre>