Quote:An exception of type 'Newtonsoft.Json.JsonSerializationException' occurred in mscorlib.ni.dll but was not handled in user code Additional information: Error getting value from 'DisplayMemberPath' on 'MS.Internal.DisplayMemberTemplate'.
private async void InsertUser(UsersLog user) { // This code inserts a new User into the database. **await Users.InsertAsync(user);** users.Add(user); } private void Button_Click(object sender, RoutedEventArgs e) { var userName = new UsersLog { Username = txtUserName.Text }; if (MyPassword.Text == MyPassword1.Text) { var password = new UsersLog { Password = MyPassword1.Text }; ListPickerItem selectedItem = this.lpkSecQuestion.ItemContainerGenerator.ContainerFromItem(this.lpkSecQuestion.SelectedItem) as ListPickerItem; var securityQ = new UsersLog { SecurityQuestion = selectedItem }; var answer = new UsersLog { Answer = txtAnswer.Text }; InsertUser(userName); InsertUser(password); InsertUser(securityQ); InsertUser(answer); //launch a form to register Owner (RegisterOwner.xaml) NavigationService.Navigate(new Uri("/RegisterOwner.xaml", UriKind.Relative)); } else { MessageBoxResult result = MessageBox.Show("The Password mismatch","User Account",MessageBoxButton.OKCancel); switch (result) { //User pressed OK button case MessageBoxResult.OK: MyPassword.Text = ""; MyPassword1.Text = ""; MyPassword.Focus(); break; } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)