There are 2 things to consider-
1. If
ID is number type then make sure that txtID has some value or not and also make sure that you are passsing numeric data to it.
2. If
ID is of type VARCHAR,NVARCHAR,CHAR or NCHAR then you are missing a pair of single quote around the value. Change like this
string strQuery = "Select * from tblStudent where ID = '" + txtID.Text +"'";
Hope, it helps :)