This Forum is ARCHIVE only
For LightSwitch questions,
please use the official forums at:

http://social.msdn.microsoft.com/forums/en-US/lightswitch/threads


Navigating to a page in your LightSwitch Application
Last Post 05 Sep 2011 01:10 AM by millaine. 3 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Michael WashingtonUser is Offline
Send Private Message
Posts:1313
Avatar

--
05 Jun 2011 06:45 AM


    Each page in LightSwitch has a "_Run" method.

    Use code such as this:

    partial void PublicPage_Run(ref bool handled)
    {
        // Set handled to 'true' to stop further processing.
        Dispatchers.Main.Invoke(() =>
        {
            HtmlPage.Window.Navigate(new Uri("PublicPage.aspx", UriKind.Relative));
        });
        handled = true;
    }
    -----------
    Michael Washington
    http://LightSwitchHelpWebsite.com
    Michael WashingtonUser is Offline
    Send Private Message
    Posts:1313
    Avatar

    --
    07 Jun 2011 06:11 AM
    For 'out of browser' LightSwitch apps, see:
    http://lightswitchhelpwebsite.com/F...fault.aspx
    -----------
    Michael Washington
    http://LightSwitchHelpWebsite.com
    millaine anigboUser is Offline
    New Member
    New Member
    Send Private Message
    Posts:2
    Avatar

    --
    05 Sep 2011 01:08 AM
    Many thanks Michael.

    Quick question Please, How do I make it so the new page being navigated to is rendered in a new (window / tab)?
    millaine anigboUser is Offline
    New Member
    New Member
    Send Private Message
    Posts:2
    Avatar

    --
    05 Sep 2011 01:10 AM
    Ah, figured it out. Will just set the target to _blank like a normal asp.net hyperlink
    You are not authorized to post a reply.


    Microsoft Visual Studio is a registered trademark of Microsoft Corporation / LightSwitch is a registered trademark of Microsoft Corporation