i don't know well..
but, i have idea.
con.Open();
string query = "select Name from View where ID like'" + txtID.Text +"%'";
SqlDataAdapter da = new SqlDataAdapter(query, con);
DataSet ds = new DataSet();
da.Fill(ds);
if (ds.Tables[0].Rows.Count > 0)
{
GridViewItm.DataSource = ds.Tables[0]; // Edit!
}
else
{
Response.Write(@"<script language='javascript'>alert('Requested Records Not Found')</script>");
}