"Specified argument was out of the range of valid values"
the code is:
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;
GridViewItm.DataBind();
GridViewItm.Show();
}
else
{
Response.Write(@"");
}
Manj NPosted Sep 5, 2013, 2:36 AM
put a breakpoint at line-> string query,
run the visual studio, and when this line comes you select the query and copy it, and paste it in sql, execute it..
and check error is coming or not, nd see where u did wrong in query, and change the query