Sometime we might want to navigate to a specific URL in LightSwitch application. That might be a web page URL or a direct URL to some file. If you are a Silverlight developer, you might know how to navigate to an URL but there are some trick in case of LightSwitch. If you are looking for a piece of code to learn the mechanism and to include in your project, then this post will guide you step-by-step. Browser Application If you are building a browser based LightSwitch application, you can just call the "HtmlPage.Window.Navigate(…)" method present under the "System.Windows.Browser" namespace. You will just need to add the dll reference of "System.Windows.Browser.dll" to make the piece of code to work. Make sure to surround the call with a Dispatcher, so that, it should not throw cross thread exception. To do this, you have to call the "Microsoft.LightSwitch.Threading.Dispatchers.Main.BeginInvoke(…)" method as demonstrated below: ...


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

</ span>Articles,Computer Tutorials, LightSwitch