C# – Custom behavior if silverlight does not exist

.netc++silverlight

using the Silverlight control (asp:Silverlight) on an aspx page, is there a way to customize the behavior if silverlight does not exist? I want to display a table with images in them if silverlight does not exist on the client.

Best Solution

Tim Heuer has written lots of info about this. Here's the main point, straight from his blog:

    <asp:Silverlight ID="Xaml1" runat="server"
     Source="~/ClientBin_SilverlightApplication1.xap" 
                 MinimumVersion="2.0.30523" Width="100%" Height="100%">
             <PluginNotInstalledTemplate>


             Your Content goes here.


             </PluginNotInstalledTemplate>
        </asp:Silverlight>

Here is the original blog post
http://timheuer.com/blog/archive/2008/03/25/creating-a-great-silverlight-deployment-experience.aspx

And a couple follow ups
http://timheuer.com/blog/archive/2008/09/08/silverlight-install-experience-too-hard.aspx http://timheuer.com/blog/archive/2008/12/02/silverlight-install-experience-best-practices-netflix.aspx

And, for your viewing pleasure
http://silverlight.net/learn/learnvideo.aspx?video=57016