Skip to Content
ASP.NET 3.5 For Dummies®
book

ASP.NET 3.5 For Dummies®

by Ken Cox
February 2008
Intermediate to advanced
428 pages
8h 52m
English
For Dummies
Content preview from ASP.NET 3.5 For Dummies®

16.3. Displaying Rich Media with the MediaPlayer Control

The ASP.NET Extensions MediaPlayer control (see Figure 16-4) is the fastest way to present Windows Media on an ASP.NET page. I use the word present because the MediaPlayer control frames the content (using Silverlight) into a skinned scene complete with Start, Stop, Pause, Volume, and Full Screen mode buttons.

Figure 16-4. The ASP.NET MediaPlayer control includes Stop, Start, and Pause buttons.

Unlike the Silverlight control, you don't need to provide the MediaPlayer control with a .xaml file. Point it to the .wmv location, and you're done. Follow these steps to display a Windows Media file by using the MediaPlayer control:

  1. Add an AJAX Web form named mediacntrl.aspx to your project.

    The MediaPlayer control requires the ScriptManager control that's included in the AJAX Web Form template.

  2. From the Toolbox, in Design view, drop an ASP.NET MediaPlayer control on the page.

  3. Using the MediaPlayer control's Properties window (F4), set the MediaSkin property to Professional and the MediaSource property to the location of a .wmv file (for example, http://www.kencox.ca/media_control.wmv).

At runtime, you can click the MediaPlayer control's Full Screen button (far left) to expand the display to the screen's width and height. Press the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

ASP.NET 3.5 Unleashed

ASP.NET 3.5 Unleashed

Stephen Walther
ASP.NET 4 Unleashed

ASP.NET 4 Unleashed

Stephen Walther, Kevin Hoffman, Nate Dudek

Publisher Resources

ISBN: 9780470195925Purchase book