protected void DataList1_ItemCommand1(object source, DataListCommandEventArgs e) { if (e.CommandName == "select") { embed1.Attributes.Add("src", @"http://~/Uploads4/"); embed1.Attributes.Add("filename",e.CommandArgument.ToString()); this.modal1.Show(); } }
<asp:Button runat="server" ID="hiddenTargetControlForModalPopup" Style="display: none" /> <ajaxtoolkit:modalpopupextender ID="modal1" TargetControlID="hiddenTargetControlForModalPopup" PopupControlID="Panel1" runat="server" BehaviorID="bhvModel1"> <asp:Panel ID="Panel1" runat="server" Height="346px" Width="553px"> <object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="Player1"> <param name="URL" value="http://localhost/Music.wmv"> <param name="http://path_to_the_video"> <param name="AutoStart" value="1"> <param name="ShowControls" value="1"> <param name="ShowStatusBar" value="1"> <param name="ShowDisplay" value="1"> <param name="stretchToFit" value="1"> <embed runat="Server" id="embed1" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/" width="424" height="379" autostart="1" showcontrols="1" showstatusbar="1"> </embed> </object> </param></param></param></param></param></param></param>
embed1.Attributes.Add("filename",Server.MapPath(e.CommandArgument.ToString()));
embed1.Attributes.Add("filename",e.CommandArgument.ToString());
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)