locked
Page navigate issue

    Question

  • Hi,

    I am using the 'basic page' template to create xaml pages...mainly for its top back button.  All works fine normally.

    But in one page, I pass a parameter in a custom cancel button on the page (code below).  This works fine...the button goes to the page I need (pageReceipts) and that page uses the parameter.  But then when I use the top back button on this page (pageReceipts)...it falls over with an error -

    An exception of type 'System.Collections.Generic.KeyNotFoundException' occurred in mscorlib.dll but was not handled in user code

    What am I doing wrong here?

    Private Sub cancel_Button_Click(sender As Object, e As RoutedEventArgs)
    
            Dim c1 As class_Conns.parameters1 = New class_Conns.parameters1
            c1.CustomerNo = customer1
            Me.Frame.Navigate(GetType(pageReceipts), c1)
    
        End Sub

    Thursday, October 09, 2014 10:50 PM

Answers

  • It should also show you a complete StackTrace of where that error originiated. I would guess that some page isn't getting required data in it's OnNavigatedFrom or OnNavigatedTo method.
    Friday, October 10, 2014 6:57 AM