With Reference of this link
Display and play MP4 Videos using File Path stored in database using ASP.Net DataList
You can also display the Video in Other page by using Session or Query String.
HTML
<form id="form1" runat="server">
<div>
<asp:GridView ID="GridView1" runat="server" HeaderStyle-BackColor="#3AC0F2" HeaderStyle-ForeColor="White" Width="150" AutoGenerateColumns="false">
<Columns>
<asp:BoundField DataField="Name" HeaderText="Name" />
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="lnkPlayFile" Text="Play" CommandArgument='<%# Eval("Path") %>'
runat="server" OnClick="PlayFile"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<hr />
<a class="player" id="aPlayer" runat="server" visible="false" style="height: 300px;
width: 300px; display: block;"></a>
<script src="FlowPlayer/flowplayer-3.2.12.min.js" type="text/javascript"></script>
<script type="text/javascript">
flowplayer("a.player", "FlowPlayer/flowplayer-3.2.16.swf", {
plugins: {
pseudo: { url: "FlowPlayer/flowplayer.pseudostreaming-3.2.12.swf" }
},
clip: { provider: 'pseudo', autoPlay: false},
});
</script>
</div>
</form>
Namespace
using System.IO;
using System.Data.SqlClient;
using System.Configuration;
C#
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.BindGrid();
}
}
private void BindGrid()
{
string strConnString = ConfigurationManager.ConnectionStrings["ConString"].ConnectionString;
using (SqlConnection con = new SqlConnection(strConnString))
{
using (SqlCommand cmd = new SqlCommand())
{
cmd.CommandText = "select Id, Name, Path from tblVideoFile";
cmd.Connection = con;
con.Open();
this.GridView1.DataSource = cmd.ExecuteReader();
this.GridView1.DataBind();
con.Close();
}
}
}
protected void PlayFile(object sender, EventArgs e)
{
LinkButton lnkPlayFile = sender as LinkButton;
this.aPlayer.Visible = true;
this.aPlayer.HRef = lnkPlayFile.CommandArgument;
}
SQL
CREATE TABLE [tblVideoFiles](
[Id] [int] NOT NULL,
[Name] [varchar](50) NOT NULL,
[ContentType] [varchar](50) NOT NULL,
[Path] [varchar](50) NOT NULL
) ON [PRIMARY]
GO
INSERT INTO [tblVideoFiles]
([Id]
,[Name]
,[ContentType]
,[Path])
VALUES
(1
,'Wildlife.mp4'
,'video/mp4'
,'Videos/Wildlife.wmv')
GO
Screenshot