Question

I have a Visual studio lightswitch web application with a few screens. I want to create hyperlinks which will open a specific screen when the user clicks on it. Let say one example is to send a link in email which points to the add screen.

One bonus would be to even select an entity on the screen with a link. Like: http:\app.com\companies\id=4

Was it helpful?

Solution

It seems like it is not supported out of box but with a few lines of codes it can be implemented. Url parameters are stored in System.Windows.Browser.HtmlPage.Document.QueryString however the object cannot be access directly you need to use Microsoft.LightSwitch.Threading.Dispatchers.Main.BeginInvoke

After you have the parameters you just need to fire up the necessary screen and change the SelectedItem. A tiny addition that SelectionChanged() method also needs to be called to reflect the change in the UX.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top