在asp.net中使用C#上传视频 [英] upload video using c# in asp.net

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

问题描述

如何使用asp.net将视频使用c#代码上传到我的wesite ...我想将此上传的视频保存在我的sql服务器数据库中.... pls回复

How to upload video and play using c# code to my wesite using asp.net...i want to save this uploaded video in my sql server database ....pls reply

推荐答案

在youtude中上传视频....

然后在代码中

upload video in youtude....

then in code


关于代码背后的内容
-----------------

On Code Behind
-----------------

protected void Button1_Click(object sender, EventArgs e)
{
        try
        {
           playSound();
        }
        catch (Exception ex)
        {
            Response.Write("Error in Page:" + ex.Message);
        }
}
 
public void playSound()
{
  mySrc = @"http://google.com//alarm.wav";
  //here ad your url that points to the video
}




aspx页面
-----------




aspx page
-----------

<asp:panel id="Panel1" runat="server" height="1px" width="1px" xmlns:asp="#unknown">
            <object classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" id="player">
                class="style3" height="1px" width="1px" >
                <param name="url" value="<%=mySrc %>" />
                <param name="src" value="<%=mySrc %>" />
                <param name="showcontrols" value="true" />
                <param name="autostart" value="true" />
               <!--[if !IE]>-->
                    <object type="video/x-ms-wmv" data="<%=mySrc %>" class="style4" height="1px" width="1px">
                        <param name="src" value="<%=mySrc %>" />
                        <param name="autostart" value="true" />
                        <param name="controller" value="true" />
                </object>
               <!--<![endif]-->
           </object>
        </asp:panel>


视频上传器控件SQL Server [ ^ ]


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

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