//Putting the information from the app in to the api/server void AddButton(object sender, EventArgs e) { Recipes recipee = new Recipes(Entry_Overskrift.Text, Entry_Beskrivelse.Text, 1); //If there i nothing in the entry field in the app if (!recipee.CheckInformation()) { DisplayAlert("The dish", "You need a headline", "OK"); BTN_AddDish.BackgroundColor = Color.Gray; } //If there is information in the entry else if (recipee.CheckInformation()) { var result = DisplayAlert("The dish", "The dish is added", null, "Ok"); PostRecipe(recipee); Navigation.PushModalAsync(new MainPage()); } }