Soft Corner

Soft Corner

  • 510
  • 2.3k
  • 794.8k

Call Parent aspx page from silverlight app

Nov 14 2011 7:43 AM
Hi,

I need to call aspx page from Loaded silverlight application in IFrame.

Structure: 

Root.web
 |_silverlightApplication
 |  |_ClientBin
 | |_Application.aspx
 |
 |_Home.aspx
 |
 |_Designer.aspx --Startup page
 |_Designer2.aspx

 Designer contains the IFrame, & Application.aspx is loaded into this iframe.

 I have one button in silverlight application called "back", on back btn click it will take to designer2.aspx from silverlight application.

But its not working ,the called page always loads in Iframe.

Code Used to Call aspx page from silverlight :(below code is implemented on button click event)


Uri SourceUri = new Uri(HtmlPage.Document.DocumentUri, Application.Current.Host.Source.ToString().Substring(0,Application.Current.Host.Source.ToString().IndexOf("silverlightApplication") - 1) + "/Designer2.aspx");

HtmlPage.Window.Navigate(SourceUri);

Code Used to load Silverlight apps in Iframe : (this will be in Designer.aspx)

<iframe id="frm" src="/silverlightApplication/Application.aspx" runat="server" height="800px" width="100%" scrolling="auto"></iframe>



Answers (3)