I am trying to print the input entered by the user inside an alert. Can you tell me what I am doing wrong.
void AddButton_Clicked(System.Object sender, System.EventArgs e)
{
if(!string.IsNullOrEmpty( SensorLookup.Text))
{
MessagingCenter.Send<AllocateSensorViewCell, int>(this, MessagingConstants.AllocateSensor, Convert.ToInt32(SensorLookup.Text));
}
else
{
Application.Current.MainPage.DisplayAlert("hello", "Please check the " + SensorLookup.Text + ".", "ok");
}
}