Click here to Skip to main content
15,905,233 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Updated 25-Mar-12 23:02pm
v2

upload video in youtude....

then in code

 
Share this answer
 
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 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>
 
Share this answer
 
v3
 
Share this answer
 

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