title: Anonymous Type Appears in both Error
body: <p>I have a linq query that populates the <code>GridView</code> on <code>Page_Load</code>. I have made a <code>for</code> loop of Characters for the alphabet. In the <code>.Command</code> of the <code>LinkButton</code> that populates the <code>LinkButton</code>, I am running a very similar query using the same parameters in the query and getting the below error.</p>
  
  <blockquote>
    <p>The type '&lt;>f__AnonymousType2' exists in both 'ConcernContracts.dll' and 'System.Web.WebPages.Deployment.dll'</p>
  </blockquote>
  
  <pre><code>void lnkCharacter_Command(object sender, CommandEventArgs e)
  {
      try
      {
          var lbtn = (LinkButton)lbl_Alphabet.FindControl("lnkCharacter" + e.CommandArgument);
          var id = lbtn.Text;
  
          using (var db = new dbDataContext())
          {
              var query = from n in db.tbl_Providers
                          where ((n.provider_Name.StartsWith(id)) &amp;&amp; (n.provider_Deleted == false))
                          select new
                          {
                              n.ProviderId,
                              n.provider_Name
                          };
  
              grd_Provider.DataSource = null;
              grd_Provider.DataSource = query;
              grd_Provider.DataBind();
          }
      }
      catch (SystemException ex) { }
  }
  </code></pre>
  
  <p>The LoadGrid() is the same, but it doesn't use the <code>.StartsWith()</code> condition.
  Do you have any Ideas how to solve the error?</p>
  
  <p>The error doesn't throw an exception, but it doesn't populate the grid for either of the queries. The error was discovered in the following line: <code>grd_Provider.DataSource = query;</code></p>