Media in my aspx

Discussion in 'ASP .Net' started by Mario, May 20, 2010.

  1. Mario

    Mario Guest

    I need to play short movie on my aspx page (created from the master page).
    In VS2008 I inserted Silverlight application project. Got
    silverlightControlHost element in my TestPage. Cut and copy element in my
    aspx page didn't run until I didn't changed the source, correcting the path
    as it shown below.

    Now I heard the sound of wmv file, but can't got the picture, although I got
    it correctly on my TestPage which don't have master template.

    My question is How do I got movie element on my aspx page which is created
    from master ?

    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
    runat="server">

    <div id="silverlightControlHost" style="border-style: inset;
    background-color: #808080">

    <object data="data:application/x-silverlight-2,"
    type="application/x-silverlight-2" width="100%" height="100%">

    <param name="source"
    value="./ClientBin/SilverlightAplikacija.xap"/>

    <param name="onError" value="onSilverlightError" />

    <param name="background" value="white" />

    <param name="minRuntimeVersion" value="3.0.40624.0" />

    <param name="autoUpgrade" value="true" />

    <a
    href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40624.0"
    style="text-decoration:none">

    <img src="http://go.microsoft.com/fwlink/?LinkId=108181"
    alt="Get Microsoft Silverlight" style="border-style:none"/>

    </a>

    </object><iframe id="_sl_historyFrame"
    style="visibility:hidden;height:0px;width:0px;border:0px"></iframe>

    </div>

    ......

    </asp:Content>



    p.s.

    MainPage.xaml looks like this:

    <UserControl x:Class="SilverlightAplikacija.MainPage"

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

    mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480">

    <Grid x:Name="LayoutRoot">

    <MediaElement x:Name="So32v64_56k_wmv" Margin="123,61,197,179"
    Source="./Film/So32v64-56k.wmv" Stretch="Fill" AutoPlay="True"/>

    </Grid>

    </UserControl>

    So I don't know how the <silverlightControlHost> knows that this xaml file
    is what I need ?

    Second thing which bother me is the Path. Source="./Film/So32v64-56k.wmv
    means that folfer FILM must be in ClientBin folder of my project ???
     
    Mario, May 20, 2010
    #1
    1. Advertising

  2. On May 20, 9:22 am, "Mario" <> wrote:
    > My question is How do I got movie element on my aspx page which is created
    > from master ?
    >
    > <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
    > runat="server">
    >
    >     <div id="silverlightControlHost" style="border-style: inset;
    > background-color: #808080">
    >
    > .....
    >
    > </asp:Content>


    From what you've posted here, I see that this code is already from the
    content page, not "from master". Maybe your problem is in one of the
    file paths, specified in the code. The easiest way to check it is
    probably to copy silverlight app to the root directory of the website
    and change all paths to "/filename..."
     
    Alexey Smirnov, May 25, 2010
    #2
    1. Advertising

  3. Mario

    Mario Guest

    "Alexey Smirnov" <> wrote in message
    news:...
    On May 20, 9:22 am, "Mario" <> wrote:
    > My question is How do I got movie element on my aspx page which is created
    > from master ?
    >
    > <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
    > runat="server">
    >
    > <div id="silverlightControlHost" style="border-style: inset;
    > background-color: #808080">
    >
    > .....
    >
    > </asp:Content>


    From what you've posted here, I see that this code is already from the
    content page, not "from master". Maybe your problem is in one of the
    file paths, specified in the code. The easiest way to check it is
    probably to copy silverlight app to the root directory of the website
    and change all paths to "/filename..."

    Thnx. I solved, somehow.
     
    Mario, May 27, 2010
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gerry O'Brien [MVP]
    Replies:
    0
    Views:
    521
    Gerry O'Brien [MVP]
    Apr 11, 2004
  2. =?Utf-8?B?Sm9uIFNjaHdhcnR6?=

    RE: Using Windows Media Player 10 on an ASPX page

    =?Utf-8?B?Sm9uIFNjaHdhcnR6?=, Jan 31, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    441
    =?Utf-8?B?Sm9uIFNjaHdhcnR6?=
    Jan 31, 2005
  3. =?Utf-8?B?Sm9uIFNjaHdhcnR6?=

    Using Windows Media Player 10 on an ASPX page

    =?Utf-8?B?Sm9uIFNjaHdhcnR6?=, Jan 31, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    488
    =?Utf-8?B?Sm9uIFNjaHdhcnR6?=
    Jan 31, 2005
  4. John M
    Replies:
    1
    Views:
    1,292
    Kumar Reddi
    May 29, 2005
  5. Ollie Riches

    embedded media player in aspx page

    Ollie Riches, Jan 5, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    412
    Alessandro Angeli
    Jan 5, 2007
Loading...

Share This Page