Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have SQL database with video src path, I have to play videos in HTML5 video player
dynamically after evry 24 hours . I could i Achieve this .. Please help this is urgent.

Front End
XML
<video id="homevideo" width="100%" controls onended="run()" runat="server">
           <source  type='video/mp4'/></video>

CodeBehind:
C#
protected void Page_Load(object sender, EventArgs e)
   {
       String dir = "video/1.mp4";
       homevideo.Attributes.Add("src", dir);

   }
Posted
Updated 11-Dec-14 7:46am
v2

1 solution

If you have framework 4.5, the <video> tag maps to the HtmlVideo class when you use runat="server"... You can use it to handle the source - http://msdn.microsoft.com/en-us/library/system.web.ui.htmlcontrols.htmlvideo(v=vs.110).aspx[^]
In previous framework versions such tag maps to a generic html control, that just prevent from you to set anything meaningful attribute on it. So if you are working with HTML5 video in web forms based application - grab .NET 4.5...
 
Share this answer
 
Comments
alok0000 13-Dec-14 1:24am    
Thanks for your Reply.. I need code i am using 4.0

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