asp:MediaPlayer and asp:Silverlight controls update


As I am sure you have heard, we just published the Silverlight 2 Beta 1.  In addition to all the other cool stuff in Silverlight 2, we have included the ASP.NET support for Silverlight…   Just install Microsoft Silverlight Tools Beta 1 for Visual Studio 2008 to check this out. 

Check out my recent post for more information: Islands of Richness with Silverlight on an ASP.NET page

 

image

Check out our quickstarts, and the new ASP Silverlight forums.

Comments (9)

  1. Silverlight 2 Beta 1 is now available!! You can download from here: Microsoft Silverlight Tools Beta

  2. Silverlight 2 Beta is here!!!!

  3. Nit says:

    Can we call xaml based methods in ASP .net.In th sense if i have a Silverlight UserControl Say PersonControl which exposes public methods say SetPerson then is there a way to call SetPerson  in my managed code in aspx.cs

  4. BradA says:

    > Can we call xaml based methods in ASP .net.In th sense if i have a Silverlight UserControl Say PersonControl which exposes public methods say SetPerson then is there a way to call SetPerson  in my managed code in aspx.cs

    No, I am afriad this is not supported as the C# code for the Silverlight control was built for the Silverlight runtime rather than the full .NET Framework.  However it is possible to do codesharing between Silvelright and ASP.NET projects.. look for a future post on that!

  5. Nit says:

    Thanks for the reply 🙂 Actually I am in the implementation process and want to take quick decisions..Would be helpful if you could hint me on this ..Are you talking about the HTML integration between ASP .Net and Silverlight ? (e.g usinh HTMLPage.Invoke)

    Thanks in advance!

  6. Wilco Bauwer says:

    Nit: You can’t directly call your Silverlight app’s C# methods from ASP.NET, but you can call them from JS. To do this, simply register a scriptable object (HtmlPage.RegisterScriptableObject(key, obj)) and mark the relevant members with [ScriptableMember]. You can then get a reference to your scriptable object through "plugin.content.<key>" and invoke its scriptable members.

    For more information on this, see http://silverlight.net/QuickStarts/Dom/DomAccess.aspx as well as http://www.wilcob.com/Wilco/Silverlight/silverlight-interoperability.aspx.

    If you want to pass information from ASP.NET to your Silverlight application, you could do a few things:

    – Render some JS that invokes a scriptable method, passing in the information.

    – Render the information in a hidden field. Your Silverlight application can get a reference to this via HtmlPage.Document.GetElementById(…) and read its value.

  7. Nit says:

    Hey thanx for the reply!I have already implemented ASP .Net interaction with Silverlight through scriptable types.was looking out for other options if thats feasible.But it seems Silverlight control has yet to be developed to behave like a true User Control.I hope future will support calling xaml methods from aspx.cs files.

    Cheers!