title: playing videos stored as string from database using html5 c# asp
body: <p>i have a code that uploads my videos on a folder and its file path is stored in the sql server database.</p>
  
  <p>i dont know how to play the video on another seperate page</p>
  
  <p>any help or code would be much appreciated.</p>
  
  <p>the following is my upload code</p>
  
  <pre><code>protected void btnInvoke_Click(object sender, EventArgs e)
      { 
          string name = FileUpload1.PostedFile.FileName;
          string ext = System.IO.Path.GetExtension(this.FileUpload1.PostedFile.FileName);
          if (FileUpload1.PostedFile.ContentLength == 0)
          { 
              Label1.Text = "Cannot upload zero length file";
          }
  
          if (ext == ".wmv" || ext == ".flv" || ext == ".avi" || ext == ".mp4" || ext == ".3GP" || ext == ".wma")
          {
              DateTime dt = DateTime.Now;
              string tme = dt.ToLongTimeString();
              string[] t = tme.Split(':');
  
              string y = "";
              foreach (string x in t)
              {
                  y += x;
              }
  
              string aa = y + "_" + name;
  
              string Video = FileUpload1.FileName;
              string folder_path = Server.MapPath("~\\Video\\");
              FileUpload1.SaveAs(folder_path + Video);
  
              string loc = aa;
              //Session["location1"] = loc;
              SqlConnection sqlconn = new SqlConnection("Data Source=137.158.107.212;Initial Catalog=VideoDatabase;Persist Security Info=True;User ID=G0;Password=*********.");
              SqlCommand sqlcomm = new SqlCommand("videoupload2", sqlconn);
              sqlcomm.CommandType = CommandType.StoredProcedure;
  
              sqlcomm.Parameters.Add("@video_name", SqlDbType.VarChar, 200).Value = videonametextbox.Text;
              sqlcomm.Parameters.Add("@video_loc", SqlDbType.VarChar, 500).Value = loc;
              sqlcomm.Parameters.Add("@video_language", SqlDbType.VarChar, 200).Value = languagetextbox.Text;
  
              sqlconn.Open();
              sqlcomm.ExecuteNonQuery();
              sqlconn.Close();
  
              Label2.Text = "Video Song uploaded Successfully";
          }
          else
          {
              Label2.Text = "please choose video file";
          }
      }
  </code></pre>