Click here to Skip to main content
15,906,645 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all,
i am creating a video gallery using asp.net with c# so that i need a file uploader control.

i can upload video to a folder which reside in application but i am not able to play this video in any player on browser.

i tried with google but still solution less.

plz help me>>
thanks in adv.
Posted
Comments
Ankur\m/ 9-Jan-12 8:18am    
Check the format these files are stored in. Then verify if they are supported for the player that you are using.

1 solution

 
Share this answer
 
Comments
bkthebest 10-Jan-12 1:58am    
thanks Uday,

i had go with your link and tried.
i found the following error.

"Error in Application" for this line "Video v = new Video("modules/video/xcvxchappyfit2.mp4")"

even i include namespace as the link said...
Plzz help
Uday P.Singh 10-Jan-12 2:03am    
Its hard to to say without seeing you code.
Uday P.Singh 10-Jan-12 2:04am    
why downvote?
bkthebest 12-Jan-12 0:27am    
ok, i am providing you my code

.aspx page code:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="testing_vid.aspx.cs" Inherits="testing_vid" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:FileUpload ID="fuUploadVideo" runat="server" />
<asp:Button ID="btnUploadVideo" runat="server" Text="Button" />
</div>
</form>
</body>
</html>

.cs page:

using System;
using Microsoft.DirectX.AudioVideoPlayback;

public partial class testing_vid : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
OpenFile();
}
private void OpenFile()
{
try
{
Video ourVideo = new Video("modules/video/xcvxchappyfit2.mp4");
/* ... */
ourVideo.Owner = this;
ourVideo.Play();
ourVideo.Open("modules/video/xcvxchappyfit2.mp4");
}
catch (Exception e)
{
Response.Write(e.Message);
}
}
}//ends

**
ourVideo.Owner = this;//error in that line " Cannot implicitly convert type 'testing_vid' to 'System.Windows.Forms.Control'"

when i commented this line error converts into "Error in the application."

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