I need to make a message box pop up if a user doesnt select anything from my ddl but clicks the submit button. Id like my statement to stop wokring at this point too. Any help would be superb, thanks!
protected void btnSubmit_Click(object sender, EventArgs e)
string connectionString = "Server = *****;Database =****;User ID =*****;Password=********;Trusted_Connection = False; MultipleActiveResultSets=True" ;
SqlConnection myConnection = new SqlConnection(connectionString);
string commandString1 = "SELECT EngineerID FROM tblNewCategory Where Category like '" + ddlCategory.SelectedValue + "'";
SqlCommand myCommand1 = new SqlCommand(commandString1, myConnection);
SqlDataReader myReader1 = myCommand1.ExecuteReader();
EngineerID = myReader1.GetInt16(0).ToString();