【发布时间】:2014-06-04 10:42:53
【问题描述】:
我正在制作应用程序并收到此错误。我不知道为什么这没有导航到所需的页面。有我的代码。
public MainPage()
{
InitializeComponent();
while (appsetting.Contains("Roll_Number"))
{
txtBx_Login.Text = appsetting["Roll_Number"].ToString();
Btn_Login1_Click(null,null);
}
}
private void Btn_Login1_Click(object sender, RoutedEventArgs e)
{
try
{
string id = txtBx_Login.Text;
id = id.Substring(0, 4);
switch (id)
{
case "1234": NavigationService.Navigate(new Uri("/PrincipalPivotPage.xaml", UriKind.Relative)); break; // While I am debugging the error is showing here ....??***
case "0820": NavigationService.Navigate(new Uri("/StudentsPivotPage.xaml", UriKind.Relative)); break; // While I am debugging the error is showing here ....??**
default: MessageBox.Show("Oops..!!Correct Your Enrollment Number...."); break;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
我不知道为什么会发生这种情况,谁能解释...??
【问题讨论】: