We can embed the media player in a web page in many ways. But the easiest and the most straight forward way is to place a literal control on the web page. Then just set the text of the same as mentioned below:
Step 1:
'---Place the Literal control on the web page as mentioned below:
< asp:literal id="ltrlMediaPlayer" runat="server">< /asp:literal>
Step 2:
'--- Set the text of the literal control as mentioned below:
ltrlMediaPlayer.Text = "< OBJECT ID='MediaPlayer' WIDTH='320' HEIGHT='240'" & _
"CLASSID='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95' " & _
"STANDBY='Loading Windows Media Player components...' " & _
"TYPE='application/x-oleobject' VIEWASTEXT>" & _
"< PARAM name='FileName' VALUE='ACTUAL FILE PATH' > " & _
"< PARAM name='autostart' VALUE='false'> " & _
"< PARAM name='ShowControls' VALUE='true'> " & _
"< param name='ShowStatusBar' value='true'> " & _
"< PARAM name='ShowDisplay' VALUE='false'> " & _
"< EMBED TYPE='application/x-mplayer2' NAME='MediaPlayer'> " & _
"< /EMBED>" & _
"< /OBJECT>"
Note: 'ACTUAL FILE PATH' should be the complete path of the file to be played in the media player.
Subscribe to:
Post Comments (Atom)
Ajax CalendarExtender displaying at wrong position in Chrome
< script type ="text/javascript" language ="javascript"> function onCalendarShown(sender, args)...
-
Suppose FieldName is the Bit field which tells whether the link should be visible true or false so design your gridview template like th...
-
If you are using the built-in ASP.net Validation Controls such as the RequiredFieldValidator or the RegularExpressionValidator to validate ...
-
There are various ways using which you can navigate back to the previous page. To keep the example short and simple, I will be using two ...
No comments:
Post a Comment