title: Get query string from an ajax call
body: <p>Hi I am trying to get a querystring from an ajax call and it does not seem to work so well.Here is my code:</p>
  
  <pre><code>@Ajax.ActionLink("Add To Cart" ,
                               "AddToCart" ,
                               "Products", 
                               new {
                                      ProductId = @products.ElementAt(0).Value
                                   },
                               new AjaxOptions{
                                                 Url = "/Products/AddToCart",
                                                 InsertionMode = InsertionMode.Replace,
                                                 UpdateTargetId = "UpdateCart",
                                                 HttpMethod = "GET"
                                              })
  </code></pre>
  
  <p>Each link I have in my application calls something like this:</p>
  
  <pre><code>Products/AddToCart?ProductId=5
  </code></pre>
  
  <p>This is the controller it calls:</p>
  
  <pre><code>public ActionResult AddToCart(string ProductId)
      {
              string ProductCeva = ProductId;
      }
  </code></pre>
  
  <p>Now from what I learned so far about MVC3 I assumed that the parameter ProductId would be 5 in our case , but when I debug the code , I get that it is null.</p>
  
  <p>What am I doing wrong here and how can I get the ProductId query string in this casE?</p>