title: linq query data not showing error
body: <p>I am trying to show data from DataTable into GridView using a LINQ query but I am not able to understand that why this code is not working.  Actually GridView shows <strong>RowError HasError</strong> message. I am totally confused.</p>
  
  <p>Here's my code</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      DataTable table = (DataTable)Session["userTable"];
      string compare = Request.QueryString["id"].ToString();
      var data = from x in table.AsEnumerable()
                 where x.Field&lt;string&gt;("Userid") == compare
                 select x;
      GridView1.DataSource = data;
      GridView1.DataBind();
  }
  </code></pre>