Click here to Skip to main content
15,868,019 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
HI my requirement is to display the mp4 and pptx files in webpage ...i am using the below code but its displaying only pdf,img,mp3 files ...any helps please

What I have tried:

in .aspx:

<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">


<asp:Literal ID="lit1" runat="server" >




in aspx.cs:

protected void Page_Load(object sender, EventArgs e)
{
var directory = new DirectoryInfo(Server.MapPath("~/Files/"));
var myFile = directory.GetFiles()
.OrderByDescending(f => f.LastWriteTime)
.First();
string strurl = "<iframe width='100%' height='400' scrolling='auto' src='/Files/" + myFile.ToString() + "'></iframe>";

lit1.Text = strurl;


}
Posted
Updated 16-May-16 1:38am

1 solution

You can try html5 video player.



refer HTML5 Video

Let me know if you found the solution
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900