M
Mario
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" designWidth="640" 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 ???
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" designWidth="640" 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 ???