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>
Loading


Javeed M ShaikhRank #839 · 2.7K reputationPosted Nov 14, 2011, 5:33 AM EST
ClientScript.RegisterStartupScript(GetType(), "Load", "");
Soft CornerRank #1,221 · 1.5K reputationPosted Nov 14, 2011, 7:25 PM EST
Thanks for reply , but I don't thing so we can use ClientScript in Silverlight,
Can you please check the attached sample project?
I need to call designer2.aspx as a new page but its getting loaded in Current Iframe of Designer.aspx page.
Soft CornerRank #1,221 · 1.5K reputationPosted Nov 14, 2011, 8:09 PM EST
Its a really silly mistake , I didnt set the target for page.
Correction :
HtmlPage.Window.Navigate(SourceUri,"_parent");