<div> <video id="videotag" loop width="1000px" height="700px" autoplay runat="server"> </video> </div>
XmlDataDocument xmldoc = new XmlDataDocument(); XmlNodeList xmlnode; FileStream fs = new FileStream(Server.MapPath("VideoData.xml"), FileMode.Open, FileAccess.Read); xmldoc.Load(fs); xmlnode = xmldoc.GetElementsByTagName("FILE"); HtmlGenericControl control = new HtmlGenericControl("source"); for (int i = 0; i <= xmlnode.Count - 1; i++) { control.Attributes.Add("src", "videos\\" + xmlnode[i].ChildNodes.Item(0).InnerText.ToString()); control.Attributes.Add("type","video/mp4"); videotag.Controls.Add(control); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)