When I execute my code below, this error message occurs:
"An exception of type \'System.Data.SqlClient.SqlException\' occurred in System.Data.dll bu
Try this
SqlCommand cmd = new SqlCommand("SELECT EmpName FROM Employee WHERE EmpID=@id", con); cmd.Parameters.AddWithValue("id", id.Text);