Click here to Skip to main content
13,250,453 members (51,413 online)
Click here to Skip to main content
Articles » Web Development » ASP.NET » Data » Downloads

Stats

219K views
9.4K downloads
121 bookmarked
Posted 28 Nov 2007

Video Uploader Control for SQL Server

, 28 Nov 2007
Upload and insert video, audio, or image to SQL Server, and show it in an ASPX page.
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register src="UploadVideo.ascx" tagname="UploadVideo" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <uc1:UploadVideo ID="UploadVideo1" runat="server" />
    
    </div>
    <br />
    <br />
    <asp:Button ID="ButtonShowVideo" runat="server" onclick="ButtonShowVideo_Click" 
        Text="Show Video" />
    <br />
    <asp:Repeater ID="Repeater1" runat="server">
        <ItemTemplate>
            <object id="player" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" 
                        height="170" width="300">
                        <param name="url" value='<%# "VideoHandler.ashx?id=" + Eval("ID") %>'/>
                        <param name="showcontrols" value="true" />
                        <param name="autostart" value="true" />
                    </object>
        </ItemTemplate>
    </asp:Repeater>
    <br />
    <br />
    <br />
    <asp:Button ID="ButtonBind" runat="server" onclick="ButtonBind_Click" 
        Text="Bind" />
    <asp:GridView ID="GridView1" runat="server" BackColor="White" 
        BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
        ForeColor="Black" GridLines="Vertical">
        <footerstyle backcolor="#CCCC99" />
        <rowstyle backcolor="#F7F7DE" />
        <Columns>
            <asp:templatefield>
                <ItemTemplate>
                    <object id="player" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" 
                        height="170" width="300">
                        <param name="url" value='<%# "VideoHandler.ashx?id=" + Eval("ID") %>'/>
                        <param name="showcontrols" value="true" />
                        <param name="autostart" value="true" />
                    </object>
                </ItemTemplate>
            </asp:templatefield>
        </Columns>
        <pagerstyle backcolor="#F7F7DE" forecolor="Black" horizontalalign="Right" />
        <selectedrowstyle backcolor="#CE5D5A" font-bold="True" forecolor="White" />
        <headerstyle backcolor="#6B696B" font-bold="True" forecolor="White" />
        <alternatingrowstyle backcolor="White" />
    </asp:GridView>
    </form>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Islam ElDemery
Web Developer Business Development Gate
Egypt Egypt

You may also be interested in...

Pro
Pro
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.171114.1 | Last Updated 28 Nov 2007
Article Copyright 2007 by Islam ElDemery
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid