srujana
srujana

Reputation: 67

How to reload a page in windows phone 7 app

when user wins the game if he want to play the game again in this case page needs to reload again. for this I have tried the below code but exception has came.what is the correct way to reload a page.

 NavigationService.Navigate(new Uri(string.Format("/NumericEasy.xaml"+
                                "?Refresh=true&random={0}", Guid.NewGuid())));

Upvotes: 0

Views: 1197

Answers (1)

Olter
Olter

Reputation: 1139

I suppose, you're getting this exception:

Navigation is only supported to relative URIs that are fragments, or begin with '/', or which contain ';component/'

You should set the UriKind parameter. Change your code a bit:

NavigationService.Navigate(new Uri(string.Format("/NumericEasy.xaml?random={0}", Guid.NewGuid()), UriKind.Relative));

Upvotes: 1

Related Questions