try { if (!string.IsNullOrWhiteSpace(txtEmailId.Text)) { string _userId = txtEmailId.Text; if (Regex.IsMatch(_userId, @"^(?("")("".+?(?<!\\)""@)|(([0-9a-z]((\.(?!\.))|[-!#\$%&'\*\+/=\?\^`\{\}\|~\w])*)(?<=[0-9a-z])@))" + @"(?(\[)(\[(\d{1,3}\.){3}\d{1,3}\])|(([0-9a-z][-\w]*[0-9a-z]*\.)+[a-z0-9][\-a-z0-9]{0,22}[a-z0-9]))$", RegexOptions.IgnoreCase)) { if (!string.IsNullOrWhiteSpace(txtPassword.Password)) { string _password = txtPassword.Password; requestUri = objHttpHelper.login_url; requestUri = string.Format(requestUri, _userId, _password); uri = new Uri(requestUri); response = await httpClient.GetAsync(uri); string strResponse = await response.Content.ReadAsStringAsync(); LoginDetails loginDetails = JsonConvert.DeserializeObject<logindetails>(strResponse); IList<error> err = loginDetails.Error; if (loginDetails.status_message == "Valid" && loginDetails.status_code == "1") { ApplicationState.SetValue("EmailId", _userId); ApplicationState.SetValue("UserID", loginDetails.userId); ApplicationState.SetValue("SessionId", loginDetails.sessionId); ApplicationState.SetValue("Password", _password); httpClient.Dispose(); Frame.Navigate(typeof(Home)); } else {} catch(Exception e) {}
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)