How can I pass query string variables with NavigationService.Navigate?
- by Mike Hildner
Greetings,
Searched for this, but no luck.
I'm attempting to pass query string variables (and then retrieve them) in my Silverlight 4 app. First I tried this
this.NavigationService.Navigate(new Uri("/LoanProductionRegion?Elvis=Alive&ImHungry=true", UriKind.Relative));
But HtmlPage.Document.QueryString doesn't pick them up because they come after the anchor (the full url looks like http://localhost:1076/Dashboard.SLTestPage.aspx#/LoanProductionRegion?Elvis=Alive&ImHungry=true).
I tried to put the vars in front, such as
this.NavigationService.Navigate(new Uri("?Elvis=Alive&ImHungry=true/LoanProductionRegion", UriKind.Relative));
this.NavigationService.Navigate(new Uri("/?Elvis=Alive&ImHungry=true/LoanProductionRegion", UriKind.Relative));
But both result in a "Page not found" error. Anyone know how to achieve what I'm after?