I want to compare the MAX Value of a SQL String to a value in a field on my webform, this is the code I use
string MAXQuery = "SELECT MAX(ID) FROM employees"; SqlCommand myCommand = new SqlCommand(MAXQuery, connection); int maxId = Convert.ToInt32(myCommand.ExecuteScalar()); string strMaxID = Convert.ToString(maxId); if (strMaxID >= txtID.Text) {
But it highlights my if statement and tells me operator > can not be applied to operands of string and string