So, I want to create some Silverlight charts from some data on my ASP.NET web page. The way to do this, either using Visifire (my current thing) or the upcoming Silverlight
I'd suggest a more AJAXy sort of approach: have JS request the XAML and then runtime insert that XAML into the control (see the HTML Bridge) after the XAML has been returned from the server. That way your control could do a nice animation/transition to the new display.
Still, you can do what you're aiming at:
Point the Silverlight server control at the .ASPX page:
... asp:Silverlight ID="Xaml1" runat="server" Source="~/ClientBin/myXAMLPage.aspx" MinimumVersion="2.0.30523" Width="100%" Height="100%">
Trigger the UpdatePanel to do it's thing whenever a user clicks your button.
Now, whenever a user clicks a button, the Update Panel (containing the Silverlight control) will be rendered, and that SL control will request the XAML file and render what it finds.
Do note, this approach instantiates the control with a XAML file. This means that you won't be able to use managed code in Silverlight. If you need managed code, instead of specifying the "myXAMLPage.aspx" page in the Source, specify your .xap file and then use an initparam to specify "myXAMLPage.aspx". Inside you're Silverlight application, download the xaml file (WebClient or whatever), and then use XamlReader.Load to load it up and display it.
hth, Erik