Asp.net mvc
can anybody give me the proceedure for inserting videos into database and how to reteive and display web page in ASP.net mvc application?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Afzaal Ahmad ZeeshanRank #60 · 27.6K pointsPosted Mar 18, 2015, 3:25 AM EDT
Finally, if you still want to do the same... You are going to first change the schema of your database's table. Create a table, and set its type to image (which would hold binary data); note that it doesn't represent the image files but all kind of files.
You can insert the binary of the file into this column, and retrieve the binary data from this column; convert it to file using WriteBytes and add a MIME-type to denote what type of file it is. Once returned, use that file in the HTML element on your web page.
Read this example article by Mikesdotnetting, to learn more on this process (about images). http://www.mikesdotnetting.com/article/148/save-and-retrieve-files-from-a-sql-server-ce-database-with-webmatrix