Is there any way to get previous page url in silverlight navigation application. I am using navigation Service.
Asked
Active
Viewed 437 times
2 Answers
0
There is no way to get the navigation history, you can store it by yourself by listening the navigation service event NavigationService.Navigated (or Frame.Navigated for frame navigation).
private List<Uri> _navigationHistory = new List<Uri>();
void onNavigated(object sender, NavigationEventArgs e)
{
_navigationHistory.Add(e.Uri);
}
private Uri getBackUri()
{
return _navigationHistory.Count > 1
? _navigationHistory[_navigationHistory.Count - 2]
: null;
}

Tonio
- 743
- 1
- 4
- 18
-
Thanks tonio... i have used navigation parameter :)but your response also helps me..thanks :) – May 06 '13 at 09:59
-
I have got an idea that there is no other way to get previous url except saving that to some list in silverlight :( – May 06 '13 at 10:00
-1
There is a way through which you can get URL of previous page before postback.
if (!IsPostBack)
{
Session["PrvPageUrl"] = Request.UrlReferrer.ToString();
}
It might be help you.

Dany
- 2,034
- 8
- 34
- 54
-
It's not for Silverlight application Raj is using navigation Service with Silverlight ;) – Tonio May 06 '13 at 08:55