How to control SMF player from aspx webforms?

Jan 4, 2012 at 12:02 AM

For various complicated reasons, I need to embed an SMF player in an aspx webforms application. That is easily done using the examples, and it works great with various PC based browsers:

<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="960" height="580" id="sv1">
<param name="source" value="ProgressiveDownloadPlayer.xap"/>
<param name="minRuntimeVersion" value="4.0.50401.0" />
<param name="autoUpgrade" value="true"/>
<param name="InitParams" value="mediaurl=http://myvideo.mp4"/>
</object>

But how in the heck are you supposed to modify the mediaurl from the C# code? I don't want to use javascript and haven't seen any complete examples on how to do this in any case.

This should be a nobrainer - am I missing something obvious?

Thanks, Tom

Jan 9, 2012 at 10:01 AM

By C# code, do you mean ASP.NET code behind or Silverlight?

In ASP.NET, it's easy to do it:

<param name="InitParams" value="mediaurl=<?= VideoUrl ?>" />

And in your code-behind file, you just define a C# property

public string VideoUrl
{
    get;
    private set;
}