DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   ASP.NET (http://www.daniweb.com/forums/forum18.html)
-   -   Retrieve videos from databse (http://www.daniweb.com/forums/thread124187.html)

nandhinijp May 14th, 2008 7:39 am
Retrieve videos from databse
 
Hi,
I want to store video name in database and videos in one folder.This can be achieved by fileupload.
How to retrieve videos from database and display on windows media player depending upon the query?

peter_budo May 14th, 2008 2:17 pm
Re: Retrieve videos from databse
 
  1. Retrive name and video location from database
  2. Prefix video file location string with rest of the path
  3. Pass this new generated string path to media player

nandhinijp May 15th, 2008 12:53 am
Re: Retrieve videos from databse
 
Please explain how to pass these details to media player.

peter_budo May 15th, 2008 3:51 am
Re: Retrieve videos from databse
 
Here is nice tutorial how to do it in ASP.NET with C# or this one in regards of Silverlight
However with Silverlight you getting in trouble as not everyone has it, I'm one of them as I believe that is useless, just attempt to bit Adobe and the Flash (but that is just me)

sebastian3 May 15th, 2008 4:49 am
Re: Retrieve videos from databse
 
Firstly upload the video file to a folder in the server by :

if (flUpload.PostedFile.ContentLength > 0)
{
    String strPath = Server.MapPath("../") + "UploadedFiles/Folder";
    flUpload.PostedFile.SaveAs(strPath + "/" +  this.flUploadBrief.FileName.ToString());
}

where
<asp:FileUpload runat="server" ID="flUploadBrief" />
is the FileUpload Control.

And save the name of the File in database.

Then u can view the video by :
<embed src="video.avi" />

nandhinijp May 15th, 2008 7:36 am
Re: Retrieve videos from databse
 
Hi,
If i give src="video.avi" its load only that video.But I want to play video from database.. Video name in DB video in folder.How to give src="..." This is my problem now.Upload k.

sebastian3 May 16th, 2008 2:25 am
Re: Retrieve videos from databse
 
This is the Object tag.

<OBJECT id=mPlayer height=250 width=320 classid=CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95 VIEWASTEXT>
<PARAM NAME="filename" VALUE="moviepreview/<%Response.Write(Request.QueryString.Get("id"));%>">

You have to fill the value from server side code.

nandhinijp May 21st, 2008 3:12 am
Re: Retrieve videos from databse
 
<param name='fileName' value="../videos/<%#(Request.QueryString["VID"])%>">
I tried this but its working only one paritcular link only once.Its not working for all queries.

.I have 2 pages X and Y. I click the gridview hyperlink in X page it goes to Y page.In X page datanavigateurl field are specified.query string is empty for all other link.thats the problem.

nandhinijp May 21st, 2008 4:57 am
Re: Retrieve videos from databse
 
I solved that problem.I did some mistake in querystring.

nandhinijp May 22nd, 2008 1:54 pm
Re: Retrieve videos from databse
 
I have one more problem regarding this.
I have 2 pages X and Y. I click the gridview hyperlink in X page it goes to Y page.In X page datanavigateurl field are specified.I want to pass only id of the video.In that Y page i want to do some server side code in source code(html) .coz there is some conditions to retrieve videoname.So i want to process and result will be assign to one variable that variable will be assign to media player.Help me!


All times are GMT -4. The time now is 10:27 pm.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC