public async void ConnectionCheck() { string strConnectionProfile = string.Empty; try { ConnectionProfile intProfile = NetworkInformation.GetInternetConnectionProfile(); if (intProfile == null) { MessageDialog myMessage = new MessageDialog("Unable to connect to the internet"); await myMessage.ShowAsync(); loginButton.IsEnabled = false; } else { RSS.fnCallRetrievalFunction(); } } catch (Exception e) { e.Message.ToString(); } }