[RESOLVED] how to post a video on video player

I want to post few videos on a website but i don't want to use youtube or any other website.

I want to have an in-build player on the webpage with video in it - how to accoplish that ?

Object tag????

if you dont prefer that...you got to think of Silverlight...


How I can do this :http://www.asp.net/general/videos/how-do-i-multiple-file-uploads-in-aspnet-2

Could you please help me with the code and things needs to be done in order to accoplish this ?

Complete code....

<%@ Page Language="C#"%>
<%@ Import Namespace="System.IO" %>

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

<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
        String UpPath;
        UpPath = "C:\\UploadedUserFiles";

        if (!Directory.Exists(UpPath))
    protected void btnSubmit_Click(object sender, EventArgs e)
        HttpFileCollection uploads = HttpContext.Current.Request.Files;
        for (int i = 0; i < uploads.Count; i++)
            HttpPostedFile upload = uploads[i];

            if (upload.ContentLength == 0)

            string c = System.IO.Path.GetFileName(upload.FileName); // We don't need the path, just the name.

                upload.SaveAs("C:\\UploadedUserFiles\\" + c);
                Span1.InnerHtml = "Upload(s) Successful.";
            catch (Exception Exp)
                Span1.InnerHtml = "Upload(s) FAILED.";

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<form id="form1" runat="server" enctype="multipart/form-data">
<p id="upload-area">
   <input id="File1" type="file" runat="server" size="60" />

<input id="AddFile" type="button" value="Add file" onclick="addFileUploadBox()" />
<p><asp:Button ID="btnSubmit" runat="server" Text="Upload Now" OnClick="btnSubmit_Click" /></p>
<span id="Span1" runat="server" />

<script type="text/javascript">
    function addFileUploadBox() {
        if (!document.getElementById || !document.createElement)
            return false;

        var uploadArea = document.getElementById("upload-area");

        if (!uploadArea)

        var newLine = document.createElement("br");

        var newUploadBox = document.createElement("input");

        // Set up the new input for file uploads
        newUploadBox.type = "file";
        newUploadBox.size = "60";

        // The new box needs a name and an ID
        if (!addFileUploadBox.lastAssignedId)
            addFileUploadBox.lastAssignedId = 100;

        newUploadBox.setAttribute("id", "dynamic" + addFileUploadBox.lastAssignedId);
        newUploadBox.setAttribute("name", "dynamic:" + addFileUploadBox.lastAssignedId);

thoughts on "[RESOLVED] how to post a video on video player "

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>