ASP.NET C# WEB PAGE + SQL SERVER 2005 DB
I am trying to display a Flash Video on a page with the FILENAME supplied to an asp.net flash video control from a sqldatasource. I have filtered my sqldatasource with a value sent by the querystring and that works ok pulling back the required data.
I have put my flash movie control inside an asp:repeater to enable me to pull in the data (this works ok because I have some text labels that pull in data just fine - see txt labels in code). I'm using a flashvideo control from http://www.aspnetflashvideo.com/
My files are stored in the filesystem (in the public part of my website /uploads/airtimetv/*******
I have a hard coded path that leads to where my flash file are stored on my server and I'd like to stick a filename from the datasource to the end of the path to achieve this...
The part I want pulled from my datasource is 'movie.flv' which will be different for each movie that is selected from a list on the previous page.
I have my aspx code set like up this
v/<% #Eval("moviefile")%>' & this doesn't work.
I'm assuming that there needs to be some sort of C# in the codebehind to create a string that will replace the whole VideoURL but quite how I'd put that together I don't know.
Hope I've got what I'm trying to achieve clear enough - if not just shout and I'll add more info. Cheers guys.
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyConnetionString %>" SelectCommand="SELECT * FROM [CAirtime] WHERE ([id] = @id)">
<asp:QueryStringParameter DefaultValue="0" Name="id" QueryStringField="AirtimeID" Type="Int32" />
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
<ASPNetFlashVideo:FlashVideo ID="FlashVideo1" runat="server" Height="360px" VideoURL='uploads/airtimetv/<% #Eval("moviefile")%>' Width="480px" AllowFullScreen="False" >
<p>movielabel: <asp:Label ID="movielabelLabel" runat="server" Text='<%# Eval("movielabel") %>' /></p>
<p>moviefile: <asp:Label ID="moviefileLabel" runat="server" Text='<% #Eval ("moviefile") %>' /></p>