Windows phone 7 在Windows Phone 7中找不到可替代的合适方法时,在导航的页面之间传递数据

Windows phone 7 在Windows Phone 7中找不到可替代的合适方法时,在导航的页面之间传递数据,windows-phone-7,navigation,parameter-passing,overriding,Windows Phone 7,Navigation,Parameter Passing,Overriding,我正在尝试在页面之间导航时传递参数。。 在第一页中,我有: private void companyGrid_Tap(object sender, GestureEventArgs e) { String tempVal = ""; tempVal = "PassVal"; NavigationService.Navigate(new Uri("/ComPage.xaml?comID=" + tempVal, UriKind.Relativ

我正在尝试在页面之间导航时传递参数。。 在第一页中,我有:

private void companyGrid_Tap(object sender, GestureEventArgs e)
    {
        String tempVal = "";
        tempVal = "PassVal";
        NavigationService.Navigate(new Uri("/ComPage.xaml?comID=" + tempVal, UriKind.Relative));
    }
在下一页我有:

protected override void onNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
    {
        base.OnNavigatedTo(e);
        String strId = NavigationContext.QueryString["comID"];

    }
但是我得到一个关于覆盖“onNavigatedTo”的错误,mathod说:“没有找到合适的方法来覆盖”

我检查,所有的例子都显示了传递参数的相同方法。。。
也许有人知道它不工作的原因是什么?

我现在不在我的桌面上,所以不是100%确定,但它不应该导航到(开始时大写O)

所以你会:

protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
    base.OnNavigatedTo(e);
    String strId = NavigationContext.QueryString["comID"];
}