I posted the following in Visual Studio Development Tools before I noticed the bug report forum. I apologize for the multiple postings.
----
I just wanted to mention that when using the ASP.NET MediaPlayer wrapper tool, it does not display the Install Silverlight prompt if the Silverlight version is not installed in the browser.
To workaround this situation, I added an instance of the ASP.NET Silverlight wrapper control at the top of the page, with the width and height set to 0. This forces the Install Silverlight prompt to display when required. Not a major problem but I wanted
to mentioned it, as to appears to be a bug in the MediaPlayer control.
Also, I noticed that the Silverlight control does not require a hyperlink in the Not Installed Template to display the prompt. Is hardwiring that link in the dll wise, considering the link may change in the future?
In order to check the Not Installed functionality, I was following Tim Heuer's suggestion of disabling the Silverlight plugin in the browser. When you do that, for some reason the MediaPlayer control does not insert the Install Silverlight prompt, but the
Sliverlight control does insert the prompt.
If you completely uninstall Silverlight, however, the MediaPlayer control works properly, showing the Not Installed prompt.
So, I suppose the lesson here is always completely uninstall Silverlight when checking whether the Not Installed functionality is working properly.
It has not been fixed now. However, we can use javascript to get the Silverlight plug-in and then get its version. Below is a sample.
<%@ Page Language="c#" AutoEventWireup="true" %>
<%@ Register Assembly="System.Web.Silverlight" Namespace="System.Web.UI.SilverlightControls"
TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" style="height:100%;">
<head runat="server">
<title>Test Page For CalendarStyle</title>
<script src="Silverlight.js" type="text/javascript"></script>
<script type="text/javascript" language ="javascript">
function test(){
var version = "2.0.30523.8";
var isInstalled = Silverlight.isInstalled(version);
if(isInstalled) alert("Silverlight has been installed");
else alert("not installed!");
}
</script>
</head>
<body style="height:100%;margin:0;">
<form id="form1" runat="server" style="height:100%;">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div style="height:100%;">
<asp:Silverlight ID="Xaml1" runat="server" Source="~/ClientBin/CalendarStyle.xap" MinimumVersion="2.0.30523" Width="100%" Height="100%" OnPluginLoaded="test"/>
</div>
</form>
</body>
</html>
Best regards,
Jonathan
Please mark the replies as answers if they help or unmark if not.
If you have any feedback about my replies, please contact msdnmg@microsoft.com.
Microsoft One Code Framework
fchateau
Member
35 Points
17 Posts
ASP.NET MediaPlayer Control and Install Silverlight Prompt
Aug 15, 2008 10:29 AM | LINK
I posted the following in Visual Studio Development Tools before I noticed the bug report forum. I apologize for the multiple postings.
----
I just wanted to mention that when using the ASP.NET MediaPlayer wrapper tool, it does not display the Install Silverlight prompt if the Silverlight version is not installed in the browser.
To workaround this situation, I added an instance of the ASP.NET Silverlight wrapper control at the top of the page, with the width and height set to 0. This forces the Install Silverlight prompt to display when required. Not a major problem but I wanted to mentioned it, as to appears to be a bug in the MediaPlayer control.
Also, I noticed that the Silverlight control does not require a hyperlink in the Not Installed Template to display the prompt. Is hardwiring that link in the dll wise, considering the link may change in the future?
Fred Chateau
fchateau
Member
35 Points
17 Posts
Re: ASP.NET MediaPlayer Control and Install Silverlight Prompt
Aug 15, 2008 07:36 PM | LINK
Well, I have an interesting update on this.
In order to check the Not Installed functionality, I was following Tim Heuer's suggestion of disabling the Silverlight plugin in the browser. When you do that, for some reason the MediaPlayer control does not insert the Install Silverlight prompt, but the Sliverlight control does insert the prompt.
If you completely uninstall Silverlight, however, the MediaPlayer control works properly, showing the Not Installed prompt.
So, I suppose the lesson here is always completely uninstall Silverlight when checking whether the Not Installed functionality is working properly.
Fred Chateau
Jonathan She...
All-Star
50156 Points
4951 Posts
Microsoft
Re: ASP.NET MediaPlayer Control and Install Silverlight Prompt
Aug 19, 2008 10:43 AM | LINK
Hi Fchateau,
It has not been fixed now. However, we can use javascript to get the Silverlight plug-in and then get its version. Below is a sample.
Best regards,
Jonathan
If you have any feedback about my replies, please contact msdnmg@microsoft.com.
Microsoft One Code Framework