title: Not able to Upload video files using ajaxfileupload control in asp.net c#, results into error with red block
body: <p>I am using ajax toolkit from <a href="http://www.asp.net/ajaxlibrary/AjaxControlToolkitSampleSite/" rel="nofollow">here</a></p>
  
  <p>I can upload .jpg, .jpeg, .txt, .doc, but not able to upload .wmv file..ie not able to upload videos file.</p>
  
  <p>Below is my code</p>
  
  <p><strong>File.aspx</strong></p>
  
  <pre><code>&lt;asp:AjaxFileUpload ID="AjaxFileUpload1" OnUploadComplete="AjaxUpload1_OnUploadComplete"
      runat="server"/&gt;
  </code></pre>
  
  <p><strong>File.cs</strong></p>
  
  <pre><code>protected void AjaxUpload1_OnUploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
      {
          try
          {
              // Generate file path
              string filePath = "~/Images/" + e.FileName;
  
              // Save upload file to the file system
              AjaxFileUpload1.SaveAs(MapPath(filePath));
  
          }
          catch (Exception ex)
          {
              Page.ClientScript.RegisterStartupScript(this.GetType(), "Error", string.Format("&lt;script type='text/javascript'&gt;alert('{0}')&lt;/script&gt;", ex.Message.ToString()));
          }
      }
  </code></pre>
  
  <p>I want to know where i am wrong... what i have to add in the code so that i can upload video files</p>