Try this....:)
1)VideoPlay.aspx
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table style="width: 400px;" border="0" cellpadding="2" cellspacing="3">
<tr>
<td style="width: 150px;" valign="top">
</td>
<td style="width: 200px;" valign="top" align="left">
<asp:label id="lblMsg" cssclass="tdMessage" text="" runat="server" xmlns:asp="#unknown"></asp:label>
</td>
</tr>
<tr>
<td class="tdText" valign="top" align="left">
<nobr> Select a file</nobr>
</td>
<td style="text-align: left;" valign="top">
<asp:fileupload id="fUpload" runat="server" width="300px" xmlns:asp="#unknown"></asp:fileupload>
</td>
</tr>
<tr>
<td valign="top" align="left">
<asp:button id="btnUpload" runat="server" text="Upload" onclick="btnUpload_Click" xmlns:asp="#unknown">
</asp:button>
</td>
<td valign="top" align="left">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0">
width="200" height="100">
<param name="movie" value="<% =swfFileName%>">
<param name="quality" value="high">
<embed src="<%=swfFileName%>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer">
type="application/x-shockwave-flash" width="200" height="100">
</embed></param></param></object>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
2)VideoPlay.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
namespace VideoDemo
{
public partial class VDemo : System.Web.UI.Page
{
public string swfFileName;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnUpload_Click(object sender, EventArgs e)
{
if (fUpload.FileContent.Length >0 && IsVaildFile())
{
string Path = GetUplaodImagePhysicalPath();
DirectoryInfo dirUploadImage = new DirectoryInfo(Path);
if (dirUploadImage.Exists == false)
{
dirUploadImage.Create();
}
string fileUrl = Path + fUpload.PostedFile.FileName;
fUpload.PostedFile.SaveAs(fileUrl);
swfFileName = "images/" + fUpload.PostedFile.FileName;
}
}
private bool IsVaildFile()
{
string swfExt = System.IO.Path.GetExtension(fUpload.PostedFile.FileName);
switch (swfExt)
{
case ".swf":
return true;
default:
{
lblMsg.Text = "Please select only swf file.";
return false;
}
}
}
string GetUplaodImagePhysicalPath()
{
return System.Web.HttpContext.Current.Request.PhysicalApplicationPath + "images\\";
}
}
}