protected void checkTelx_ServerValidate(ref bool bOk, int id) { string userInput = null; Label errorLabel = null; switch (id) { case 1: userInput = Tel1.Text; errorLabel = errorTel1; resetError(errorLabel); if (Tel1.Text.Length == 0) { setError(errorTel1, "MobileNumber 1 must be set", ref bOk); } break; case 2: userInput = Tel2.Text; errorLabel = errorTel2; resetError(errorLabel); break; case 3: userInput = Tel3.Text; errorLabel = errorTel3; resetError(errorLabel); break; case 4: userInput = Tel4.Text; errorLabel = errorTel4; resetError(errorLabel); break; case 5: userInput = Tel5.Text; errorLabel = errorTel5; resetError(errorLabel); break; default: return; } string error = Data_AppUserFile.Check_MobileNumber(userInput, id); if (error != null) { setError(errorLabel, error, ref bOk); } }