title: how to bind list to gridview in mvc4
body: <p>I am creating a demo web internet mvc4 with web api,now I get the stub that I can not bind the list to gridview or table to show item,here is my code.</p>
  
  <p>My controller,</p>
  
  <p>here is the json web api return:</p>
  
  <pre><code>[{"Id":1,"Name":"test2","Category":"test","price":23.0},
  {"Id":2,"Name":"test1","Category":"test","price":12.0}]
  </code></pre>
  
  <p>here is the controller,</p>
  
  <pre><code>public ActionResult Index()
   {
    HttpClient client = new HttpClient();
    client.BaseAddress = new Uri("http://localhost:54854");
  
    // Add an Accept header for JSON format.
    client.DefaultRequestHeaders.Accept.Add(
          new MediaTypeWithQualityHeaderValue("application/json"));
    HttpResponseMessage response = client.GetAsync("api/Values").Result;
    if (response.IsSuccessStatusCode)
    {
     var products = response.Content.ReadAsAsync&lt;IEnumerable&lt;Products&gt;&gt;().Result;
      return View(products);
    }
    else
    {
     return View();
    }
  </code></pre>
  
  <p>Modal</p>
  
  <pre><code>public class Products
      {
          public int Id { get; set; }
          public String Name { get; set; }
          public String Category { get; set; }
          public Double price { get; set; }
      }
  </code></pre>
  
  <p>View Index.cshtml</p>
  
  <pre><code>@{
      ViewBag.Title = "Index";
  }
  </code></pre>
  
  <p>would you please continue to show product list to gridview ? thankyou very much</p>