Deepak Ratan

Deepak Ratan

  • NA
  • 175
  • 50.8k

Using ASP LinkButton Control how to play video ? Help

Apr 16 2015 7:09 AM
 
YouTube_WebForm.aspx
 
<asp:ListView ID="Listviewid" Visible="true" runat="server" AutoGenerateColumns="false" RepeatColumns="1" CellSpacing="15">
            <ItemTemplate>
                        <table>
                                 <tr>
                                       <td>
                                                <asp:LinkButton ID="LinkID" runat="server" Text="Play" CommandArgument='<%# Eval("ID", "Generic_Handler.ashx?Id={0}")%>' OnClick="LinkID_Click"></asp:LinkButton>
                                       </td>
                                 </tr>
                     </table>
         </ItemTemplate>
</asp:ListView>
                     <a class="player" id="aPlayer" runat="server" visible="false" style="height: 300px; width: 300px; display: block;"></a>
 
 
 
YouTube_WebForm.aspx.cs 
 
   protected void LinkID_Click(object sender, EventArgs e)
   {
         LinkButton linkplayvideo = sender as LinkButton;
         this.aPlayer.Visible = true;
         this.aPlayer.HRef = linkplayvideo.CommandArgument;
   }
 
 
Database 
 
    ID varchar(MAX) ---> "In this ID column should save the FileName and Uploaded DateTime"
    FileType varchar(50) ,
   Video varbinary(MAX)

Answers (1)