Prev: Reminder - Microsoft Responds to the Evolution of Community
Next: adding webparts during runtime. Problem !
From: Mario on 20 May 2010 03:22 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 ???
From: Alexey Smirnov on 25 May 2010 17:16 On May 20, 9:22 am, "Mario" <mzu...(a)vup.hr> 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..."
From: Mario on 27 May 2010 01:07
"Alexey Smirnov" <alexey.smirnov(a)gmail.com> wrote in message news:69317937-bb1b-41bf-b4f2-04ad5a061e0e(a)c7g2000vbc.googlegroups.com... On May 20, 9:22 am, "Mario" <mzu...(a)vup.hr> 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. |