如何使用SQL Server 2005在ASP.NET中上传视频 [英] How to upload video in asp.net with sql server 2005

查看:52
本文介绍了如何使用SQL Server 2005在ASP.NET中上传视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请告诉我我如何使用带有C#的Asp.net在Sql服务器数据库中上传或保存视频.></b>

please tell me how i upload or save a video in Sql-server database using Asp.net with C#.<b></b>

推荐答案

也许 [
Maybe this[^] can help you get started.


尝试此链接

如何从asp.net c#应用程序上传视频 [
try this link

How to Upload Videos from asp.net c# Application[^]


在保存"按钮后面的代码中
------------------------------------
In Code Behind Save Button
------------------------------------
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;
                }


------------------------------------------------
在aspx页面中
------------------


------------------------------------------------
In aspx Page
------------------

<dl><dt><label>Video</label></dt>
<dd><asp:FileUpload runat="server" ID="flup_Video_Path" ></asp:FileUpload></dd>
</dl>


-------------------------------------------------- -
------------------------------------
在SQL表中创建此字段
---------------------------------
Video_Path nvarchar(200)


----------------------------------------------------
------------------------------------
In SQL Table Create this field
---------------------------------
Video_Path nvarchar(200)


这篇关于如何使用SQL Server 2005在ASP.NET中上传视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆