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.

Published 05 March 08 11:44 by BradA
Filed under: , ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# asp:MediaPlayer and asp:Silverlight controls update said on March 5, 2008 3:57 PM:

PingBack from http://www.silverlightshow.net/items/3888.aspx

# Bilal Haidar [MVP, MCT] said on March 6, 2008 2:33 AM:

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

# Creative Jar Blog said on March 6, 2008 4:19 AM:

Silverlight 2 Beta is here!!!!

# Jason Haley said on March 6, 2008 9:43 AM:
# Nit said on May 6, 2008 2:15 PM:

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

# BradA said on May 6, 2008 4:53 PM:

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

# Nit said on May 7, 2008 8:52 AM:

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!

# Wilco Bauwer said on May 7, 2008 2:21 PM:

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.

# Nit said on May 7, 2008 9:51 PM:

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!

Leave a Comment

(required) 
(optional)
(required) 

Search

Go

This Blog

Syndication

Page view tracker