how can I add new query to gridview?
<p>I have a list of data and I want to use that data to search in a table.The query works fine but it doesn't keep previously data.Is there any solution for it?</p>

<p>here's the code:</p>

<pre><code>foreach (string Id in LstID)
{
    GdEmp.DataSource = employee.ShowData(Id);
    GdEmp.DataBind();

}
</code></pre>

<p>here's the query:</p>

<pre><code>public class Employee
{
    public string family { get; set; }
    public string name { get; set; }
    ....


public List&lt;Employee&gt; ShowData(string Id)
    {
        try
        {
            var Query = from P in Bank.employee
                where P.Id == Id
                select new Employee
                {
                    family = P.Family,
                    name= P.Name,
                    ...
                };
            return Query.ToList();

        }
     }
</code></pre>
