Dynamic rich media component for ASP.Net Flash, Video and Audio controls for C# and VB.Net

How To:  Define HTML Alternative Content


1.  Key Concepts

 

1.  Purpose

ASPNetFlash WebControl HTML Alternative content serves 3 important purposes:

  1. Helps maintain the look and feel of a website when visitors have no Flash Player plugin, or if their plugin cannot play your Flash Movie.  
  2. Allows web designers to guarantee full functionality and accessibility for every website user.
  3. Unlike Adobe Flash Movies, search engines can read and spider HTML alternative content - which aids Search Engine Optimization.

2.  Usage

    The HTML Alternative content is always rendered.  In the rendered page, it is placed within an HTML element, whose ID attribute matches that of the ASPNetFlash WebControl instance.  In the case that Flash is available to the user, the WebControl's Flash Movie is written over this content.  The HTML Alternative can be defined in 2 ways:

  1. Using the WebControl Smart Tags (Edit Templates) - Visual Studio 2005 (and above).
  2. Directly in the ASPX Code View

    The HTML alternative can contain any ASPX-style content except for code blocks i.e.: <% Response.Write("Hello World"); %>.  To test and debug your HTML alternative, you can set the WebControl's Enabled property to false.  Then, when you run the web application, the HTML alternative will render as if your browser could not display the Flash Movie.

 

2.  Tutorial

Steps 1-3 are for Visual Studio 2005 (and above) users only.  Visual Studio 2002/2003 should skip ahead to step 4.

1.  Open the Smart Tags Property Panel by clicking on the arrow on the top right of the WebControl


ASPNetFlash Tutorials HTML Alternative Smart tags

 

2.  Click on "Edit Templates" at the bottom of the panel


ASPNetFlash Tutorials HTML Alternative Edit template

 

3.  Add/Edit content within the editor.  Note that this editor can be resized.


ASPNetFlash Tutorials HTML Alternative edit template add content

 

4.  Steps 1-3 will generate the following ASPX Code.  

Optionally, you can edit this code by hand.  For Visual Studio 2002/2003 users, manual editing is the only option available.  Create the "HTMLAlternativeTemplate" tags within the ASPNetFlash:Flash tags as shown, and place your content within them.

[ASPX]