I’m using silverlight content within a aspx page.i have created silverlight page is in a separate silverlight project and i have added that project to my normal asp.net application ClientBin.i need to redirect to a aspx page on my asp.net project from a silverlight page button click.how can i achive this?
I’m using silverlight content within a aspx page.i have created silverlight page is in
Share
I think you have one of two options. In your view model for that silverlight control, during the initialization, Bind the navigate URI for a hyperlink button to the desired URI you want to navigate to. Option 2 (a lot smoother): On the click method, Invoke a javascript method on the page that hosts the silverlight object. That method would then do some sort of smooth jquery transition or just a simple navigation for you.
Option 1:
<HyperlinkButton NavigateUri="{Binding DesiredURL}" TargetName="_blank" />For option 2, remember to include:
using System.Windows.Browser;
Option 2:
Lastly, define the javascript method in the aspx/html/.js file that hosts the xap content:
}
C# will locate the javascript method when invoked from your code, and you should be good to go