Click here to Skip to main content
15,915,805 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
Is it possible to play video file using asp.net & if yes then how can i do it ?
Posted
Updated 12-Oct-11 23:45pm
v2
Comments
hitech_s 13-Oct-11 5:50am    
what are the type of files you are going to play ?

 
Share this answer
 
Hi You Can Visit this URL....................Playing .wav files using C#[^]
 
Share this answer
 
HTML
<embed src="video.avi" /> or <img dynsrc="video.avi" /> or <object data="video.avi" type="video/avi" /> 

are a few ways to do it...



Here is the code that will help you to play a video file in your application, i have used that.
XML
 <%--The code that can used to play a video file with .wmv extension --%>
<object type="video/x-ms-wmv" data="../Images/amazing.wmv" width="420" height="340">
<param name="url" value="../Images/amazing.wmv"/>
<param name="src" value="../Images/amazing.wmv" />
<param name="autostart" value="true" />
<param name="sound" value="false" />
<param name="controller" value="true" />
</object>
<%--End code to play video file--%>

Change the url according to your file in application.
 
Share this answer
 
v3
 
Share this answer
 
refer these links

Embedded Media Player with hot key controls and adding play list capability (ASX file)[^]

other way

Check this
HTML
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" name="mediaplayer1" 
ShowStatusBar="true" EnableContextMenu="false" autostart="false" width="320" 
height="240" loop="false" src="linqtalk1.wmv" />


Be sure to have a video file named linqtalk1.wmv in the same directory with the aspx file

or simply change the src attribute to point to the path of a real video file.

Hope that helps [Yes]
 
Share this answer
 
v2

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