Click here to Skip to main content
16,011,647 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
please tell me how i upload or save a video in Sql-server database using Asp.net with C#.<b></b>
Posted
Comments
Mohammed Asif.K 12-May-11 2:05am    
follow solution 3
Mohammed Asif.K 12-May-11 2:05am    
this simple way

Maybe this[^] can help you get started.
 
Share this answer
 
Comments
cool09488 12-May-11 23:05pm    
thanx 4 help
 
Share this answer
 
Comments
cool09488 12-May-11 23:05pm    
thnx 4 help
In Code Behind Save Button
------------------------------------
C#
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;
                }

------------------------------------------------
In aspx Page
------------------
XML
<dl><dt><label>Video</label></dt>
<dd><asp:FileUpload runat="server" ID="flup_Video_Path" ></asp:FileUpload></dd>
</dl>

----------------------------------------------------
------------------------------------
In SQL Table Create this field
---------------------------------
Video_Path nvarchar(200)
 
Share this answer
 
Comments
cool09488 12-May-11 23:06pm    
thank you
cool09488 14-May-11 1:20am    
where i put the connection string in this code and table name

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