Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
how to save the path of video in database and video in folder and how retrieve the video from database
Posted

 
Share this answer
 
how to save the path of video in database and video in folder and how retrieve the video from database
 
Share this answer
 
[aspx page coding]

<asp:label id="label1" runat="server">Vedio
<asp:FileUpload runat="server" ID=flup_Video_Path"
<asp:Button id="btn_save" runat="server" text="Save">


[save button coding]

if (flup_Video_Path.HasFile)
{
string fileName_Vdo = Path.GetFileNameWithoutExtension(Guid.NewGuid().ToString() + "_" + flup_Video_Path.FileName).ToString() + Path.GetExtension(flup_Video_Path.FileName).ToString();
flup_Video_Path.SaveAs(Server.MapPath("~/Uploads/video/") + fileName_Vdo);
bind.Video_Path = fileName_Vdo;
}
----

[create a field in sql table like]

Video_Path nvarchar(300)

if it work please select as answer.
 
Share this answer
 
v3

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